From 5c1fc9540b5c8cc5c429a4f7a1918245b006631d Mon Sep 17 00:00:00 2001 From: John Bender Date: Fri, 13 Jan 2012 14:28:00 -0800 Subject: [PATCH] guarantee the page reset in the listview tests has completed before continuing --- tests/unit/listview/listview_core.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/unit/listview/listview_core.js b/tests/unit/listview/listview_core.js index ba5758b2..666dadce 100755 --- a/tests/unit/listview/listview_core.js +++ b/tests/unit/listview/listview_core.js @@ -4,13 +4,21 @@ // TODO split out into seperate test files (function($){ - var home = $.mobile.path.parseUrl( location.href ).pathname; + var home = $.mobile.path.parseUrl( location.href ).pathname + location.search; $.mobile.defaultTransition = "none"; module( "Basic Linked list", { setup: function(){ - $.mobile.changePage( "#basic-linked-test" ); + if( location.hash != "#basic-linked-test" ){ + stop(); + + $(document).one("pagechange", function() { + start(); + }); + + $.mobile.changePage( home ); + } } });