From 2841541362fe121977181888c3181676f0b796e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 10 Dec 2012 10:34:44 -0500 Subject: [PATCH] Core tests: Handle async focus in IE. --- tests/unit/core/core.js | 9 ++++----- 1 file 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(); });