From: Scott González Date: Wed, 3 Aug 2011 20:12:46 +0000 (-0400) Subject: Autocomplete tests: Fixed handling of cached ajax requests in IE. X-Git-Tag: 1.9m6~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6867e0b5517d4664e309652f807011ea350d1f67;p=jquery-ui.git Autocomplete tests: Fixed handling of cached ajax requests in IE. --- diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 01c4e9fef..8d11aa399 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -117,7 +117,6 @@ function sourceTest( source, async ) { source: source }), menu = element.autocomplete( "widget" ); - element.val( "ja" ).autocomplete( "search" ); function result() { equal( menu.find( ".ui-menu-item" ).text(), "javajavascript" ); element.autocomplete( "destroy" ); @@ -128,7 +127,9 @@ function sourceTest( source, async ) { if ( async ) { stop(); $( document ).one( "ajaxStop", result ); - } else { + } + element.val( "ja" ).autocomplete( "search" ); + if ( !async ) { result(); } }