diff --git a/tests/unit/navigation/external.html b/tests/unit/navigation/external.html new file mode 100644 index 00000000..c9a011dd --- /dev/null +++ b/tests/unit/navigation/external.html @@ -0,0 +1,9 @@ + + + + + + +
+ + diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index cb3cc53e..f5fca828 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -25,25 +25,21 @@ asyncTest( "External page is removed from the DOM after pagehide", function(){ - + $( "#external-test" ) .live( "pageshow", function(){ - setTimeout(function(){ - window.history.back(); - }, 500): + window.history.back(); }) .live( "pagehide", function(){ setTimeout(function(){ same( $( "#external-test" ).length, 0 ); start(); - }, 500): + }, 500); }) - + $.mobile.changePage( "external.html" ); - + }); - - asyncTest( "forms with data attribute ajax set to false will not call changePage", function(){ var called = false; @@ -86,28 +82,6 @@ start(); }], 300); }); - - //testing the data-prefetch attr - var prefetched = false; - $('#prefetch').live('pagecreate',function(event){ - prefetched = true; - ok( true, 'Page fetched properly' ); - window.history.back(); - start(); - }); - - asyncTest( "data-prefetch attribute on an anchor will preload the referenced page when its parent page is shown", function(){ - - setTimeout(function(){ - if( !prefetched ){ - ok( false, 'Page wasn\'t fetched properly' ); - window.history.back(); - start(); - } - }, 1000); - - $.mobile.changePage( "#prefetch" ); - }); asyncTest( "anchors with no href attribute will do nothing when clicked", function(){