Core tests: Split .focus() test into two tests to avoid bug in IE with stop() and start().

This commit is contained in:
Scott González 2010-09-02 11:14:00 -04:00
parent d8c6c32b87
commit 23d4eb5372

View File

@ -5,27 +5,27 @@
module('core - jQuery extensions'); module('core - jQuery extensions');
test('focus', function() { test('focus - original functionality', function() {
expect(3); expect(1);
var el = $('#inputTabindex0'), $('#inputTabindex0')
// used to remove focus from the main element .focus(function() {
other = $('#inputTabindex10'); ok(true, 'event triggered');
})
// test original functionality .focus();
el.focus(function() { });
ok(true, 'event triggered');
}); asyncTest('focus', function() {
el.focus(); expect(2);
other.focus(); $('#inputTabindex0')
.focus(function() {
// trigger event handler + callback ok(true, 'event triggered');
stop(); })
el.focus(500, function() { .focus(500, function() {
ok(true, 'callback triggered'); ok(true, 'callback triggered');
start(); $(this).unbind('focus');
}); start();
other.focus(); });
}); });
test('zIndex', function() { test('zIndex', function() {