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');
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() {
$('#inputTabindex0')
.focus(function() {
ok(true, 'event triggered');
});
el.focus();
other.focus();
})
.focus();
});
// trigger event handler + callback
stop();
el.focus(500, function() {
asyncTest('focus', function() {
expect(2);
$('#inputTabindex0')
.focus(function() {
ok(true, 'event triggered');
})
.focus(500, function() {
ok(true, 'callback triggered');
$(this).unbind('focus');
start();
});
other.focus();
});
test('zIndex', function() {