mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-27 01:24:41 +00:00
added tests to verify that dialogs referencing themselves with query params don't do anything
This commit is contained in:
parent
59bd1400ad
commit
a267a3077c
3 changed files with 49 additions and 0 deletions
18
tests/unit/navigation/dialog-param.html
Normal file
18
tests/unit/navigation/dialog-param.html
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
</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 id="dialog-param-link-page" data-nstest-role="page">
|
||||
<a href="?foo=bar" data-rel="dialog"></a>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -177,5 +177,9 @@
|
|||
<div data-nstest-role="page" id="self-link">
|
||||
<a href="#self-link">self!</a>
|
||||
</div>
|
||||
|
||||
<div data-nstest-role="page" id="dialog-param-link">
|
||||
<a href="dialog-param.html">go</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -394,4 +394,31 @@
|
|||
], 1000);
|
||||
});
|
||||
|
||||
asyncTest( "query param link from a dialog to a dialog should be a no op", function(){
|
||||
var firstDialogHash;
|
||||
|
||||
$.testHelper.sequence([
|
||||
function(){
|
||||
$.testHelper.openPage("#dialog-param-link");
|
||||
},
|
||||
|
||||
function(){
|
||||
$("#dialog_param-link a").click();
|
||||
},
|
||||
|
||||
function(){
|
||||
firstDialogHash = location.hash;
|
||||
$("#dialog-param-link-dialog a").click();
|
||||
},
|
||||
|
||||
function(){
|
||||
$("#dialog-param-link-dialog a").click();
|
||||
},
|
||||
|
||||
function(){
|
||||
same(location.hash, firstDialogHash, "additional dialog param not added");
|
||||
start();
|
||||
}
|
||||
], 1000);
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
|||
Loading…
Reference in a new issue