From 47cb8cbeeb50d58689a78b033664f85bb254bd93 Mon Sep 17 00:00:00 2001 From: scottjehl Date: Sun, 10 Jul 2011 17:14:55 -0400 Subject: [PATCH] fixed test so it passes in Firefox --- tests/unit/select/index.html | 56 ++++++++++++++++++++++++++++++++ tests/unit/select/select_core.js | 20 ++++++------ 2 files changed, 66 insertions(+), 10 deletions(-) diff --git a/tests/unit/select/index.html b/tests/unit/select/index.html index 0c9da49f..9581166b 100644 --- a/tests/unit/select/index.html +++ b/tests/unit/select/index.html @@ -52,6 +52,62 @@ + +
+ + +
diff --git a/tests/unit/select/select_core.js b/tests/unit/select/select_core.js index e83d72ee..d84f7c46 100644 --- a/tests/unit/select/select_core.js +++ b/tests/unit/select/select_core.js @@ -14,24 +14,24 @@ }); asyncTest( "a large select menu should use the default dialog transition", function(){ - var select = $("#select-choice-many-container a"), + var select = $("#select-choice-many-container-1 a"), prevDefault = $.mobile.defaultDialogTransition, menu; - //set to something else - $.mobile.defaultDialogTransition = "slideup"; + + + + //set to something else + $.mobile.defaultDialogTransition = "fooz"; $.testHelper.sequence([ function(){ // bring up the dialog select.trigger("click"); - setTimeout(function(){ - menu = $("#select-choice-many-menu").closest('.ui-dialog'); - ok( menu.is( "." + $.mobile.defaultDialogTransition )); - $.mobile.defaultDialogTransition = prevDefault; - }, 100) + ok( menu.hasClass( $.mobile.defaultDialogTransition ) ); + window.history.back(); }, + function(){ - menu.dialog("close"); start(); } ], 500); @@ -65,7 +65,7 @@ same(menu.parents('.ui-dialog').length, 1); start(); } - ], 500); + ], 1000); }); asyncTest( "custom select menu always renders screen from the left", function(){