]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs tests: Don't call start directly from setTimeout because Firefox <13 is dumb.
authorScott González <scott.gonzalez@gmail.com>
Mon, 11 Jun 2012 20:21:12 +0000 (16:21 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 11 Jun 2012 20:21:12 +0000 (16:21 -0400)
tests/unit/tabs/tabs_core.js

index b69ad406cfceae32eed8c5bbf4b3db88a571db3a..fd9cc7d63cf7373767fd49a2c5e03bd04fa86689 100644 (file)
@@ -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 );