From 7ed31bedb56eeecb9d1fad773e75c40622a90bca Mon Sep 17 00:00:00 2001 From: John Bender Date: Fri, 26 Aug 2011 15:34:52 -0700 Subject: [PATCH] added test to make sure the dialog key is always in the hash --- tests/unit/navigation/navigation_core.js | 25 +++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index d6a87523..a1d70145 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -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);