added test to make sure the dialog key is always in the hash

This commit is contained in:
John Bender 2011-08-26 15:34:52 -07:00
parent 3a13a6ec75
commit 7ed31bedb5

View file

@ -692,6 +692,30 @@
]);
});
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([
@ -718,5 +742,4 @@
}
]);
});
})(jQuery);