Skip to content
Permalink
Browse files

Core tests: Split .focus() test into two tests to avoid bug in IE wit…

…h stop() and start().
  • Loading branch information
scottgonzalez committed Sep 2, 2010
1 parent d8c6c32 commit 23d4eb5372ce67df80afd04b8c90d9c0dc2c64d6
Showing with 20 additions and 20 deletions.
  1. +20 −20 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() {

0 comments on commit 23d4eb5

Please sign in to comment.
You can’t perform that action at this time.