Skip to content
Permalink
Browse files

Tests: Whitespace

  • Loading branch information...
scottgonzalez committed Aug 1, 2014
1 parent c017628 commit 5ddc7cd4d325a78e6dae3b7fbdc6313294a6d637
Showing with 23 additions and 23 deletions.
  1. +23 −23 tests/unit/autocomplete/autocomplete_core.js
@@ -190,29 +190,29 @@ asyncTest( "past end of menu in multiline autocomplete", function() {
});

asyncTest( "ESCAPE in multiline autocomplete", function() {
expect( 2 );

var customVal = "custom value",
element = $( "#autocomplete-contenteditable" ).autocomplete({
delay: 0,
source: [ "javascript" ],
focus: function( event, ui ) {
equal( ui.item.value, "javascript", "Item gained focus" );
$( this ).text( customVal );
event.preventDefault();
}
});

element
.simulate( "focus" )
.autocomplete( "search", "ja" );

setTimeout(function() {
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.ESCAPE } );
equal( element.text(), customVal );
start();
}, 50 );
expect( 2 );

var customVal = "custom value",
element = $( "#autocomplete-contenteditable" ).autocomplete({
delay: 0,
source: [ "javascript" ],
focus: function( event, ui ) {
equal( ui.item.value, "javascript", "Item gained focus" );
$( this ).text( customVal );
event.preventDefault();
}
});

element
.simulate( "focus" )
.autocomplete( "search", "ja" );

setTimeout(function() {
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.ESCAPE } );
equal( element.text(), customVal );
start();
}, 50 );
});


0 comments on commit 5ddc7cd

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