Skip to content

Commit

Permalink
test that embedded listview pages with nested lists aren't removed by…
Browse files Browse the repository at this point in the history
… the page removal code
  • Loading branch information
johnbender committed Sep 12, 2011
1 parent c426aef commit 219b450
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/unit/listview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ <h1>Basic List View</h1>
<li><a href="#basic-link-results">Home</a></li>
<li><a href="#basic-link-results">Back</a></li>
<li><a href="#basic-link-results">Return</a></li>
<li><a href="#nested-list-test" id="nested-list-test-anchor">Nested List Test</a></li>
</ul>
</div>
<a href="cache-tests/nested.html" id="cached-tests"></a>
Expand Down
21 changes: 21 additions & 0 deletions tests/unit/listview/listview_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,4 +730,25 @@
}
]);
});

asyncTest( "embedded listview page with nested pages is not removed from the dom", function() {
$.testHelper.pageSequence([
function() {
// open the nested list page
same( $("div#nested-list-test").length, 1 );
$( "a#nested-list-test-anchor" ).click();
},

function() {
// go back to the origin page
window.history.back();
},

function() {
// make sure the page is still in place
same( $("div#nested-list-test").length, 1 );
start();
}
]);
});
})(jQuery);

0 comments on commit 219b450

Please sign in to comment.