test that title is restored on link transition to first page

This commit is contained in:
John Bender 2011-11-08 15:41:37 -08:00
parent c997b4cc20
commit 949dd4c6c8
2 changed files with 28 additions and 3 deletions

View file

@ -520,6 +520,30 @@
]);
});
asyncTest( "Page title updates properly when clicking a link back to first page", function(){
var title = document.title;
$.testHelper.pageSequence([
function(){
$.testHelper.openPage("#ajax-title-page");
},
function(){
$("#titletest1").click();
},
function(){
same(document.title, "Title Tag");
$.mobile.activePage.find("#title-check-link").click();
},
function(){
same(document.title, title);
start();
}
]);
});
asyncTest( "Page title updates properly from title tag when loading an external page", function(){
$.testHelper.pageSequence([
function(){

View file

@ -6,7 +6,8 @@
</head>
<body>
<div data-nstest-role="page"></div>
<div data-nstest-role="page">
<a href="./" id="title-check-link">back to the parent page</a>
</div>
</body>
</html>
</html>