]> source.dussan.org Git - jquery-ui.git/commitdiff
Tooltip tests: Adjust test to deal with blurring being async in IE.
authorScott González <scott.gonzalez@gmail.com>
Wed, 12 Oct 2011 14:25:55 +0000 (10:25 -0400)
committerScott González <scott.gonzalez@gmail.com>
Wed, 12 Oct 2011 14:26:51 +0000 (10:26 -0400)
tests/unit/tooltip/tooltip_events.js

index 29220705f75fc1bb1903cf0e318366cb0d84fffc..963acaf596c980259145e8131f7c928124d18003 100644 (file)
@@ -52,7 +52,7 @@ test( "focus events", function() {
        element.trigger( "blur" );
 });
 
-test( "mixed events", function() {
+asyncTest( "mixed events", function() {
        expect( 2 );
        var element = $( "#tooltipped1" ).tooltip();
 
@@ -72,8 +72,10 @@ test( "mixed events", function() {
        element.trigger( "mouseleave" );
        element.unbind( "tooltipclose" );
 
+       // blurring is async in IE
        element.one( "tooltipclose", function( event ) {
                same( event.originalEvent.type, "blur" );
+               start();
        });
        element[0].blur();
 });