moved pushstate library disable and load into testhelper

This commit is contained in:
John Bender 2011-08-17 10:49:38 -07:00
parent 886cdcf927
commit 74300195b3
3 changed files with 21 additions and 13 deletions

View file

@ -16,6 +16,16 @@
}
},
disablePushStateFor: function( libs ) {
if( $.support.pushState ) {
$.support.pushState = false;
$.each(libs, function(i, l) {
$( "<script>", { src: l }).appendTo("head");
});
}
},
reloads: {},
reloadLib: function(libName){

View file

@ -1 +0,0 @@
$.support.pushState = false;

View file

@ -5,17 +5,15 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jQuery Mobile Navigation Test Suite</title>
<script>
// This unit test requires a base tag to be set within the file.
// Most browsers require a base tag with an @href URL that is absolute.
// We need to dynamically inject the base tag so we can prefix it with
// the location of this test on the server without any server-side language
// requirements.
var baseUrl = location.href.replace(/[^\?\#\/]*(\?[^#]*)?(#.*)?$/, "");
document.write("<base href=\"" + baseUrl + "base-tests/app-base/\"/>\n");
<script>
// This unit test requires a base tag to be set within the file.
// Most browsers require a base tag with an @href URL that is absolute.
// We need to dynamically inject the base tag so we can prefix it with
// the location of this test on the server without any server-side language
// requirements.
var baseUrl = location.href.replace(/[^\?\#\/]*(\?[^#]*)?(#.*)?$/, "");
document.write("<base href=\"" + baseUrl + "base-tests/app-base/\"/>\n");
</script>
<script src="../../../../../js/jquery.js"></script>
<script src="../../../jquery.setNameSpace.js"></script>
@ -26,8 +24,9 @@
<link rel="stylesheet" href="../../../../../themes/default/"/>
<link rel="stylesheet" href="../../../../../external/qunit.css"/>
<script src="../../../../../external/qunit.js"></script>
<script src="../../../jquery.disablePushState.js"></script>
<script src="../../navigation_base.js"></script>
<script type="text/javascript">
$.testHelper.disablePushStateFor([ "../../navigation_base.js" ]);
</script>
</head>
<body>