mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-22 15:14:44 +00:00
moved finicky hashchange test to sequence helper to prevent overlap with setting the hash
This commit is contained in:
parent
d42658882a
commit
9729dc9f15
1 changed files with 16 additions and 7 deletions
|
|
@ -120,14 +120,23 @@
|
|||
});
|
||||
|
||||
asyncTest( "hashchange triggered on document ready with single argument: true", function(){
|
||||
$(window).one("hashchange", function(ev, arg){
|
||||
same(arg, true);
|
||||
start();
|
||||
});
|
||||
$.testHelper.sequence([
|
||||
function(){
|
||||
location.hash = "#foo";
|
||||
},
|
||||
|
||||
// a hash must be set to guarantee the trigger
|
||||
location.hash = "#foo";
|
||||
$.testHelper.reloadLib(libName);
|
||||
// delay the bind until the first hashchange
|
||||
function(){
|
||||
$(window).one("hashchange", function(ev, arg){
|
||||
same(arg, true);
|
||||
start();
|
||||
});
|
||||
},
|
||||
|
||||
function(){
|
||||
$.testHelper.reloadLib(libName);
|
||||
}
|
||||
], 1000);
|
||||
});
|
||||
|
||||
test( "pages without a data-url attribute have it set to their id", function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue