Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html

Issue 1309503004: Select elements should clear type-ahead session on blur. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html
diff --git a/LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html b/LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html
index 3fabb548186259e4ebee20fc63b9d664ed88d17e..9af9e496be83a9a4d9a7636701a5e194ea5f07a9 100644
--- a/LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html
+++ b/LayoutTests/fast/forms/select/select-typeahead-with-spacekey.html
@@ -39,10 +39,7 @@ function test1() {
shouldBeFalse('internals.isSelectPopupVisible(popup)');
shouldBeEqualToString('popup.value', 'United States');
popup.blur();
- setTimeout(test2, 1000);
-}
-function test2() {
debug('2. space key as part of search string with some delay.');
popup.focus();
popup.selectedIndex = 0
@@ -53,16 +50,12 @@ function test2() {
keyDown('e');
keyDown('d');
keyDown(' ');
- setTimeout(function() {
- keyDown('S');
- shouldBeFalse('internals.isSelectPopupVisible(popup)');
- shouldBeEqualToString('popup.value', 'Spain');
- popup.blur();
- setTimeout(test3, 1000);
- }, 1000);
-}
+ internals.resetTypeAheadSession(popup);
+ keyDown('S');
+ shouldBeFalse('internals.isSelectPopupVisible(popup)');
+ shouldBeEqualToString('popup.value', 'Spain');
+ popup.blur();
-function test3() {
debug('3. space key to open popup menu.');
popup.focus();
popup.selectedIndex = 0
@@ -72,13 +65,12 @@ function test3() {
keyDown('t');
keyDown('e');
keyDown('d');
- setTimeout(function() {
- keyDown(' ');
- shouldBeTrue('internals.isSelectPopupVisible(popup)');
- shouldBeEqualToString('popup.value', 'United Arab Emerites');
- popup.blur();
- finishJSTest();
- }, 1000);
+ internals.resetTypeAheadSession(popup);
+ keyDown(' ');
+ shouldBeTrue('internals.isSelectPopupVisible(popup)');
+ shouldBeEqualToString('popup.value', 'United Arab Emerites');
+ popup.blur();
+ finishJSTest();
}
test1();
« no previous file with comments | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698