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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html

Issue 2537573003: Merge "SELECT element: Commit a provisional OPTION selection on blur." to M56 (Closed)
Patch Set: Created 4 years, 1 month 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 | third_party/WebKit/LayoutTests/fast/forms/select/select-disabled.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html b/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html
index 9287cbb4d72ad5e11d693f1a5720955ceff2e64c..237fbb95c3dbbf90dc2fe15b4ee7390b4498d1c7 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-key-operations.html
@@ -30,6 +30,7 @@ function openPickerErrorCallback() {
openPicker(menu, test1, openPickerErrorCallback);
function test1() {
+ debug('==> Arrow keys + Enter');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '1');
shouldBeEqualToString('menu.value', 'bar');
@@ -71,6 +72,7 @@ function test1() {
}
function test2() {
+ debug('==> Arrow keys + ESC');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '0');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
@@ -87,11 +89,33 @@ function test2() {
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
waitUntilClosing(function() {
- openPicker(menu, test3, openPickerErrorCallback);
+ menu.value = 'foo';
+ openPicker(menu, testProvisionalSelectionAndBlur, openPickerErrorCallback);
});
}
+function testProvisionalSelectionAndBlur() {
+ debug('==> Arrow keys + blur');
+ picker = window.internals.pagePopupWindow.global.picker;
+ shouldBeEqualToString('picker._selectElement.value', '0');
+ shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
+
+ eventSender.keyDown('ArrowDown');
+ shouldBeEqualToString('picker._selectElement.value', '1');
+ shouldBeEqualToString('menu.value', 'foo');
+ shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
+
+ // Blur should close the popup and select the provisonal item.
+ menu.blur();
+ shouldBeNull('window.internals.pagePopupWindow');
+ shouldBeEqualToString('menu.value', 'bar');
+ shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
+
+ openPicker(menu, test3, openPickerErrorCallback);
+}
+
function test3() {
+ debug('==> Typeahead + ESC');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '1');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'bar');
@@ -113,6 +137,7 @@ function test3() {
}
function test4() {
+ debug('==> Hover + ESC');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '4');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
@@ -134,6 +159,7 @@ function test4() {
}
function test5() {
+ debug('==> Hover + Invalid arrow + ESC');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '4');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'garply');
@@ -162,6 +188,7 @@ function test5() {
}
function test6() {
+ debug('==> Arrow key + Click');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '0');
shouldBeEqualToString('internals.selectMenuListText(menu)', 'foo');
@@ -183,6 +210,7 @@ function test6() {
}
function testEnterWithoutSelection() {
+ debug('==> Enter with no selected OPTION');
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '');
eventSender.keyDown('Enter');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/select/select-disabled.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698