diff options
author | Dan Wellman <danwellman@hotmail.com> | 2011-11-28 08:38:34 +0000 |
---|---|---|
committer | Dan Wellman <danwellman@hotmail.com> | 2011-11-28 08:38:34 +0000 |
commit | a4fd5449b24b998ffa514f01b735da2b6465a80a (patch) | |
tree | 51b1c2828e85f538775e22cf5e3a930a8c4fe506 /tests/unit/autocomplete/autocomplete_events.js | |
parent | fce4725a8ac599efab5449710550a029a2d6fbe3 (diff) | |
parent | 53ea93327e9040b7472e8fd2af2abaea19058e4a (diff) | |
download | jquery-ui-a4fd5449b24b998ffa514f01b735da2b6465a80a.tar.gz jquery-ui-a4fd5449b24b998ffa514f01b735da2b6465a80a.zip |
Merge remote-tracking branch 'upstream/selectmenu' into selectmenu
Diffstat (limited to 'tests/unit/autocomplete/autocomplete_events.js')
-rw-r--r-- | tests/unit/autocomplete/autocomplete_events.js | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/unit/autocomplete/autocomplete_events.js b/tests/unit/autocomplete/autocomplete_events.js index 286d902f1..7b51ec4c0 100644 --- a/tests/unit/autocomplete/autocomplete_events.js +++ b/tests/unit/autocomplete/autocomplete_events.js @@ -157,22 +157,23 @@ asyncTest( "cancel select", function() { }, 50 ); }); -/* TODO previous fix broke more than it fixed, disabling this for now - messed up regular menu select event -test("blur without selection", function() { - expect(1); - var ac = $("#autocomplete").autocomplete({ +asyncTest( "blur during remote search", function() { + expect( 1 ); + var ac = $( "#autocomplete" ).autocomplete({ delay: 0, - source: data + source: function( request, response ) { + ok( true, "trigger request" ); + ac.simulate( "blur" ); + setTimeout(function() { + response([ "result" ]); + start(); + }, 100 ); + }, + open: function() { + ok( false, "opened after a blur" ); + } }); - stop(); - ac.val("j").keydown(); - setTimeout(function() { - $( ".ui-menu-item" ).first().simulate("mouseover"); - ac.simulate("keydown", { keyCode: $.ui.keyCode.TAB }); - deepEqual( ac.val(), "j" ); - start(); - }, 50); + ac.val( "ro" ).keydown(); }); -*/ }( jQuery ) ); |