From: Scott González Date: Mon, 11 Jun 2012 20:21:12 +0000 (-0400) Subject: Tabs tests: Don't call start directly from setTimeout because Firefox <13 is dumb. X-Git-Tag: 1.9.0-beta.1~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8c82edb40ca946f160089191d5bbe564159c7593;p=jquery-ui.git Tabs tests: Don't call start directly from setTimeout because Firefox <13 is dumb. --- diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js index b69ad406c..fd9cc7d63 100644 --- a/tests/unit/tabs/tabs_core.js +++ b/tests/unit/tabs/tabs_core.js @@ -269,7 +269,11 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER", equal( panels.eq( 2 ).attr( "aria-expanded" ), "false", "third panel has aria-expanded=false" ); equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "third panel has aria-hidden=true" ); - setTimeout( start, 1 ); + // support: Firefox 12 + // Firefox <13 passes arguments so we can't use setTimeout( start, 1 ) + setTimeout(function() { + start(); + }, 1 ); } setTimeout( step1, 1 ); @@ -462,7 +466,11 @@ asyncTest( "keyboard support - CTRL navigation", function() { equal( panels.eq( 0 ).attr( "aria-expanded" ), "false", "first panel has aria-expanded=false" ); equal( panels.eq( 0 ).attr( "aria-hidden" ), "true", "first panel has aria-hidden=true" ); - setTimeout( start, 1 ); + // support: Firefox 12 + // Firefox <13 passes arguments so we can't use setTimeout( start, 1 ) + setTimeout(function() { + start(); + }, 1 ); } setTimeout( step1, 1 ); @@ -554,7 +562,11 @@ asyncTest( "keyboard support - CTRL+UP, ALT+PAGE_DOWN, ALT+PAGE_UP", function() panels.eq( 1 ).simulate( "keydown", { keyCode: keyCode.UP, ctrlKey: true } ); strictEqual( document.activeElement, tabs[ 1 ], "second tab is activeElement" ); - setTimeout( start, 1 ); + // support: Firefox 12 + // Firefox <13 passes arguments so we can't use setTimeout( start, 1 ) + setTimeout(function() { + start(); + }, 1 ); } setTimeout( step1, 1 );