diff options
author | Scott González <scott.gonzalez@gmail.com> | 2012-12-10 10:34:44 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2012-12-10 10:34:44 -0500 |
commit | 2841541362fe121977181888c3181676f0b796e4 (patch) | |
tree | d6deecf9196e9bedffcc825854c42fd5ad26c97e /tests | |
parent | 0f0ec001aac23acb4b7f8cd8fc5e549b541a685d (diff) | |
download | jquery-ui-2841541362fe121977181888c3181676f0b796e4.tar.gz jquery-ui-2841541362fe121977181888c3181676f0b796e4.zip |
Core tests: Handle async focus in IE.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/core/core.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index 5ebb9e9f4..86b95e157 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -4,11 +4,12 @@ module( "core - jQuery extensions" ); TestHelpers.testJshint( "core" ); -test( "focus - original functionality", function() { +asyncTest( "focus - original functionality", function() { expect( 1 ); $( "#inputTabindex0" ) - .focus(function() { + .one( "focus", function() { ok( true, "event triggered" ); + start(); }) .focus(); }); @@ -16,12 +17,10 @@ test( "focus - original functionality", function() { asyncTest( "focus", function() { expect( 2 ); $( "#inputTabindex0" ) - .focus(function() { + .one( "focus", function() { ok( true, "event triggered" ); }) .focus( 500, function() { - // prevent double focus event in IE - $( this ).unbind( "focus" ); ok( true, "callback triggered" ); start(); }); |