mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-28 09:54:44 +00:00
moved push state dialog key test down into its own file to have the key at the root
This commit is contained in:
parent
1811b31715
commit
c3bac78880
3 changed files with 54 additions and 24 deletions
|
|
@ -692,30 +692,6 @@
|
|||
]);
|
||||
});
|
||||
|
||||
asyncTest( "dialog ui-state should be part of the hash", function(){
|
||||
$.testHelper.sequence([
|
||||
function() {
|
||||
// open the test page
|
||||
$.testHelper.openPage("#nested-dialog-page");
|
||||
},
|
||||
|
||||
function() {
|
||||
// open the dialog
|
||||
$("#nested-dialog-page a").click();
|
||||
},
|
||||
|
||||
function() {
|
||||
// verify that the hash contains the dialogHashKey
|
||||
ok( location.hash.search($.mobile.dialogHashKey) >= 0 );
|
||||
$.testHelper.openPage( "#" + home );
|
||||
},
|
||||
|
||||
function() {
|
||||
start();
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
asyncTest( "handling of button active state when navigating by clicking back button", 1, function(){
|
||||
|
||||
$.testHelper.pageSequence([
|
||||
|
|
|
|||
16
tests/unit/navigation/navigation_dialog_pushstate.js
Normal file
16
tests/unit/navigation/navigation_dialog_pushstate.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
(function($) {
|
||||
asyncTest( "dialog ui-state should be part of the hash", function(){
|
||||
$.testHelper.sequence([
|
||||
function() {
|
||||
// open the test page
|
||||
$.mobile.activePage.find( "a" ).click();
|
||||
},
|
||||
|
||||
function() {
|
||||
// verify that the hash contains the dialogHashKey
|
||||
ok( location.hash.search($.mobile.dialogHashKey) >= 0 );
|
||||
start();
|
||||
}
|
||||
]);
|
||||
});
|
||||
})(jQuery);
|
||||
38
tests/unit/navigation/push-state-dialog-tests.html
Normal file
38
tests/unit/navigation/push-state-dialog-tests.html
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>jQuery Mobile Navigation Test Suite</title>
|
||||
|
||||
<script src="../../../js/jquery.js"></script>
|
||||
<script src="../jquery.setNameSpace.js"></script>
|
||||
<script src="../../../js/"></script>
|
||||
<script src="../../../tests/jquery.testHelper.js"></script>
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../themes/default/"/>
|
||||
<link rel="stylesheet" href="../../../external/qunit.css"/>
|
||||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
<script type="text/javascript" src="navigation_dialog_pushstate.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1 id="qunit-header">jQuery Mobile Navigation Test Suite</h1>
|
||||
<h2 id="qunit-banner"></h2>
|
||||
<h2 id="qunit-userAgent"></h2>
|
||||
<ol id="qunit-tests">
|
||||
</ol>
|
||||
|
||||
<div data-nstest-role="page">
|
||||
<a href="#dialog">open the dialog</a>
|
||||
</div>
|
||||
|
||||
<div id="dialog" data-nstest-role="dialog">
|
||||
<div data-nstest-role="header" data-nstest-position="inline">
|
||||
<h1>Dialog</h1>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Reference in a new issue