diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-09-02 11:14:00 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-09-02 11:14:00 -0400 |
commit | 23d4eb5372ce67df80afd04b8c90d9c0dc2c64d6 (patch) | |
tree | a9914b61e5f4f1a9cabb5db6a9fb1054f2f91508 /tests/unit/core | |
parent | d8c6c32b87da1eddc4d687e87cc8f914396fbf5f (diff) | |
download | jquery-ui-23d4eb5372ce67df80afd04b8c90d9c0dc2c64d6.tar.gz jquery-ui-23d4eb5372ce67df80afd04b8c90d9c0dc2c64d6.zip |
Core tests: Split .focus() test into two tests to avoid bug in IE with stop() and start().
Diffstat (limited to 'tests/unit/core')
-rw-r--r-- | tests/unit/core/core.js | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/unit/core/core.js b/tests/unit/core/core.js index cb2a14570..03a7ab810 100644 --- a/tests/unit/core/core.js +++ b/tests/unit/core/core.js @@ -5,27 +5,27 @@ module('core - jQuery extensions'); -test('focus', function() { - expect(3); +test('focus - original functionality', function() { + expect(1); - var el = $('#inputTabindex0'), - // used to remove focus from the main element - other = $('#inputTabindex10'); - - // test original functionality - el.focus(function() { - ok(true, 'event triggered'); - }); - el.focus(); - other.focus(); - - // trigger event handler + callback - stop(); - el.focus(500, function() { - ok(true, 'callback triggered'); - start(); - }); - other.focus(); + $('#inputTabindex0') + .focus(function() { + ok(true, 'event triggered'); + }) + .focus(); +}); + +asyncTest('focus', function() { + expect(2); + $('#inputTabindex0') + .focus(function() { + ok(true, 'event triggered'); + }) + .focus(500, function() { + ok(true, 'callback triggered'); + $(this).unbind('focus'); + start(); + }); }); test('zIndex', function() { |