small tweak to wait for page load in navigation tests

This commit is contained in:
John Bender 2011-02-14 23:34:48 -08:00
parent 05e7bbac45
commit b1c8621309

View file

@ -205,25 +205,25 @@
}, 500);
});
test( "when loading a page where data-url is defined on a sub element set the hash with that url", function(){
asyncTest( "when loading a page where data-url is defined on a sub element set the hash with that url", function(){
location.hash = "";
$("#data-url a").click();
setTimeout(function(){
ok(location.hash.indexOf("#foo/") >= 0);
start();
}, 500);
}, 1000);
stop();
});
test( "when loading a page where data-url is not defined on a sub element hash defaults to the url", function(){
asyncTest( "when loading a page where data-url is not defined on a sub element hash defaults to the url", function(){
location.hash = "";
$("#non-data-url a").click();
setTimeout(function(){
ok(location.hash.indexOf("#non-data-url.html") >= 0);
start();
}, 500);
}, 1000);
stop();
});
})(jQuery);