mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-25 16:44:43 +00:00
fixed mobile init bind firing in another test
This commit is contained in:
parent
497344c618
commit
143fd264d2
1 changed files with 10 additions and 7 deletions
|
|
@ -52,14 +52,20 @@
|
|||
});
|
||||
|
||||
$.testHelper.excludeFileProtocol(function(){
|
||||
test( "loading the init library triggers mobilinit on the document", function(){
|
||||
asyncTest( "loading the init library triggers mobilinit on the document", function(){
|
||||
var initFired = false;
|
||||
expect( 1 );
|
||||
|
||||
$(window.document).bind('mobileinit', function(event){
|
||||
ok(true);
|
||||
initFired = true;
|
||||
});
|
||||
|
||||
$.testHelper.reloadLib(libName);
|
||||
|
||||
setTimeout(function(){
|
||||
ok(initFired, "init fired");
|
||||
start();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
test( "enhancments are skipped when the browser is not grade A", function(){
|
||||
|
|
@ -202,11 +208,8 @@
|
|||
});
|
||||
|
||||
asyncTest( "page loading should contain custom loading message", function(){
|
||||
$(document).bind('mobileinit', function(){
|
||||
$.mobile.loadingMessage = "foo";
|
||||
});
|
||||
|
||||
reloadCoreNSandInit();
|
||||
$.mobile.loadingMessage = "foo";
|
||||
$.testHelper.reloadLib(libName);
|
||||
$.mobile.pageLoading(false);
|
||||
|
||||
setTimeout(function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue