Permalink
Browse files

added tests to make sure links that reference the pages they are defi…

…ned within don't transition Fixes #1360
  • Loading branch information...
1 parent 05cc415 commit b1da5f0d06c06d8b584bd40e0a9bca3bc8513b16 @johnbender johnbender committed Apr 5, 2011
Showing with 18 additions and 0 deletions.
  1. +4 −0 tests/unit/navigation/index.html
  2. +14 −0 tests/unit/navigation/navigation_core.js
@@ -172,5 +172,9 @@ <h2 id="qunit-userAgent"></h2>
<div data-nstest-role="page" id="titletest5" data-nstest-title="Title Attr">
<div data-nstest-role="header"><h1>Title Heading</h1></div>
</div>
+
+<div data-nstest-role="page" id="self-link">
+ <a href="#self-link">self!</a>
+</div>
</body>
</html>
@@ -420,4 +420,18 @@
}
], 500);
});
+
+ asyncTest( "Page links to the current active page result in the same active page", function(){
+ $.testHelper.openPage("#self-link");
+ $.testHelper.sequence([
+ function(){
+ $("a[href='#self-link']").click();
+ },
+
+ function(){
+ same($.mobile.activePage[0], $("#self-link")[0], "self-link page is still the active page" );
+ start();
+ }
+ ], 500);
+ });
})(jQuery);

0 comments on commit b1da5f0

Please sign in to comment.