From 475069becdd6727cf5a0ad737e221e7bb66c1e2b Mon Sep 17 00:00:00 2001 From: John Bender Date: Tue, 11 Oct 2011 16:13:09 -0700 Subject: [PATCH] added test for prefetched dialog pages --- tests/unit/navigation/index.html | 9 +++++++++ tests/unit/navigation/navigation_core.js | 19 +++++++++++++++++++ tests/unit/navigation/prefetched-dialog.html | 10 ++++++++++ 3 files changed, 38 insertions(+) create mode 100644 tests/unit/navigation/prefetched-dialog.html diff --git a/tests/unit/navigation/index.html b/tests/unit/navigation/index.html index 5dae1d9a..623f8ab0 100644 --- a/tests/unit/navigation/index.html +++ b/tests/unit/navigation/index.html @@ -277,5 +277,14 @@ + +
+ + static link + +
diff --git a/tests/unit/navigation/navigation_core.js b/tests/unit/navigation/navigation_core.js index d92caf54..9416af4c 100644 --- a/tests/unit/navigation/navigation_core.js +++ b/tests/unit/navigation/navigation_core.js @@ -930,6 +930,25 @@ ]); }); + asyncTest( "prefetched links with data rel dialog result in a dialog", function() { + $.testHelper.pageSequence([ + // open our test page + function(){ + // Navigate to any page except the first page of the application. + $.testHelper.openPage("#prefetched-dialog-page"); + }, + + function() { + $("#prefetched-dialog-link").click(); + }, + + function() { + ok( $.mobile.activePage.is(".ui-dialog"), "prefetched page is rendered as a dialog" ); + start(); + } + ]); + }); + asyncTest( "application url with dialogHashKey loads application's first page", function(){ $.testHelper.pageSequence([ diff --git a/tests/unit/navigation/prefetched-dialog.html b/tests/unit/navigation/prefetched-dialog.html new file mode 100644 index 00000000..bea17990 --- /dev/null +++ b/tests/unit/navigation/prefetched-dialog.html @@ -0,0 +1,10 @@ + + + + + Title Tag + + +
+ +