fixed nav test for new namespace and made the test order independent

This commit is contained in:
John Bender 2011-07-28 13:04:49 -07:00
parent 27b4ba1691
commit 3f20eaa038
2 changed files with 9 additions and 2 deletions

View file

@ -4,7 +4,7 @@
<meta charset="utf-8">
</head>
<body>
<div data-nstest-role="page" id="external-test-cached" data-nstest-ajax-dom-caching="true">
<div data-nstest-role="page" id="external-test-cached" data-nstest-dom-cache="true">
</div>
</body>
</html>

View file

@ -4,7 +4,10 @@
(function($){
var changePageFn = $.mobile.changePage,
originalTitle = document.title,
siteDirectory = location.pathname.replace(/[^/]+$/, "");
siteDirectory = location.pathname.replace(/[^/]+$/, ""),
navigateTestRoot = function(){
$.testHelper.openPage( "#" + location.pathname );
};
module('jquery.mobile.navigation.js', {
setup: function(){
@ -26,6 +29,8 @@
asyncTest( "external page is removed from the DOM after pagehide", function(){
$.testHelper.pageSequence([
navigateTestRoot,
function(){
$.mobile.changePage( "external.html" );
},
@ -46,6 +51,8 @@
asyncTest( "external page is cached in the DOM after pagehide", function(){
$.testHelper.pageSequence([
navigateTestRoot,
function(){
$.mobile.changePage( "cached-external.html" );
},