From 219b450c5a7162d957a2f03d68c95a4dd805964d Mon Sep 17 00:00:00 2001 From: John Bender Date: Mon, 12 Sep 2011 14:47:55 -0700 Subject: [PATCH] test that embedded listview pages with nested lists aren't removed by the page removal code --- tests/unit/listview/index.html | 1 + tests/unit/listview/listview_core.js | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/tests/unit/listview/index.html b/tests/unit/listview/index.html index 9a9c93de9fa..e8b787163e8 100644 --- a/tests/unit/listview/index.html +++ b/tests/unit/listview/index.html @@ -33,6 +33,7 @@

Basic List View

  • Home
  • Back
  • Return
  • +
  • Nested List Test
  • diff --git a/tests/unit/listview/listview_core.js b/tests/unit/listview/listview_core.js index dd44fef7be8..80fa59e91ed 100644 --- a/tests/unit/listview/listview_core.js +++ b/tests/unit/listview/listview_core.js @@ -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);