@@ -55,6 +55,22 @@
}
},

pushStateRedirect: function( filename ) {
var search, pairs = [];

search = location.search.replace( "?", "");

if( search ){
pairs = search.split( "&" );
}

pairs.push( "push-state=false" );

location.href = location.href.toString()
.replace(/\/[^\/]*\?|\/[^\/]*$/, "/" + filename )
.replace( search, "") + "?" + pairs.join( "&" );
},

reloads: {},

reloadModule: function(libName){
@@ -10,6 +10,12 @@
<script src="../jquery.setNameSpace.js"></script>
<script src="../../jquery.testHelper.js"></script>
<script src="../../../external/qunit.js"></script>
<script type="text/javascript">
// redirects from push-state-tests.html
$( document ).bind( 'mobileinit', function(){
$.testHelper.setPushState();
});
</script>
<script>
$.testHelper.asyncLoad([
[
@@ -150,6 +150,10 @@

asyncTest( "should go back to top level when the back button is clicked", function() {
$.testHelper.pageSequence([
function(){
$.mobile.changePage("#nested-list-test");
},

function(){
$.mobile.changePage("#nested-list-test&ui-page=0-0");
},
@@ -158,8 +162,8 @@
window.history.back();
},

function(){
ok($('#nested-list-test').hasClass('ui-page-active'), 'Transitions back to the parent nested page');
function( timeout ){
ok($.mobile.activePage.is('#nested-list-test'), 'Transitions back to the parent nested page');
start();
}
]);

This file was deleted.

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- forces the base-tests into a push state disabled run and allows for
the test suite runner to pick it up as a seperate test set. See test/unit/ls.php,
test/unit/runner.js, base-tests.html, and tests/jquery.testHelper.js for more. -->
<script src="../../../js/jquery.js"></script>
<script src="../../jquery.testHelper.js"></script>
<script type="text/javascript">
$.testHelper.pushStateRedirect( "./" );
</script>
</head>
<body>
</body>
</html>

This file was deleted.

@@ -4,7 +4,11 @@
<!-- forces the base-tests into a push state disabled run and allows for
the test suite runner to pick it up as a seperate test set. See test/unit/ls.php,
test/unit/runner.js, base-tests.html, and tests/jquery.testHelper.js for more. -->
<meta http-equiv="refresh" content="0; url='base-tests.html?push-state=false'"></meta>
<script src="../../../js/jquery.js"></script>
<script src="../../jquery.testHelper.js"></script>
<script type="text/javascript">
$.testHelper.pushStateRedirect( "base-tests.html" );
</script>
</head>
<body>
</body>
@@ -4,7 +4,11 @@
<!-- forces the base-tests into a push state disabled run and allows for
the test suite runner to pick it up as a seperate test set. See test/unit/ls.php,
test/unit/runner.js, base-tests.html, and tests/jquery.testHelper.js for more. -->
<meta http-equiv="refresh" content="0; url='./?push-state=false'"></meta>
<script src="../../../js/jquery.js"></script>
<script src="../../jquery.testHelper.js"></script>
<script type="text/javascript">
$.testHelper.pushStateRedirect( "./" );
</script>
</head>
<body>
</body>