mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-21 06:40:59 +00:00
update nav base tests to use new push state helper
This commit is contained in:
parent
c5415307ba
commit
d82b6aacfc
2 changed files with 12 additions and 8 deletions
|
|
@ -43,14 +43,16 @@
|
|||
|
||||
// TODO prevent test suite loads when the browser doesn't support push state
|
||||
// and push-state false is defined.
|
||||
setPushStateFor: function( libs ) {
|
||||
setPushState: function() {
|
||||
if( $.support.pushState && location.search.indexOf( "push-state" ) >= 0 ) {
|
||||
$.support.pushState = false;
|
||||
}
|
||||
},
|
||||
|
||||
$.each(libs, function(i, l) {
|
||||
$( "<script>", { src: l }).appendTo("head");
|
||||
});
|
||||
stubDefine: function() {
|
||||
window.define = function(){
|
||||
Array.prototype.slice.call(arguments).pop()();
|
||||
};
|
||||
},
|
||||
|
||||
reloads: {},
|
||||
|
|
|
|||
|
|
@ -19,19 +19,21 @@
|
|||
</script>
|
||||
<script src="../../../../../js/jquery.js"></script>
|
||||
<script src="../../../jquery.setNameSpace.js"></script>
|
||||
<script src="../../../../../js/"></script>
|
||||
<script src="../../../../../tests/jquery.testHelper.js"></script>
|
||||
<script type="text/javascript">
|
||||
$.testHelper.stubDefine();
|
||||
</script>
|
||||
<script src="../../../../../js/"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../../css/themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../../../external/qunit.css"/>
|
||||
<script src="../../../../../external/qunit.js"></script>
|
||||
<script type="text/javascript">
|
||||
$.testHelper.setPushStateFor([
|
||||
"../../navigation_base.js"
|
||||
]);
|
||||
$.testHelper.setPushState();
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="../../navigation_base.js"></script>
|
||||
<script src="../swarminject.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Reference in a new issue