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

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

Issue 2360483002: SELECT popup: Touch input should not be able to select disabled OPTIONs. (Closed)
Patch Set: Created 4 years, 3 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 | third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations-expected.txt » ('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-touch-operations.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations.html b/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations.html
index f90c3f7a327326c773928cd5759b2061be62c945..71d3e8ca11d4f0a6f6c5fe78a98d69d9bb0f7dc8 100644
--- a/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations.html
+++ b/third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations.html
@@ -68,13 +68,46 @@ openPicker(menuElement, function () {
shouldBeNull('window.internals.pagePopupWindow');
shouldBeEqualToString('menuElement.value', 'baz');
- test2();
+ testDisabled();
}, function () {
testFailed('picker didn\'t open')
finishJSTest();
});
+function testDisabled() {
+ debug("==> Test disabled option");
+ menuElement.options[0].disabled = true;
+ openPicker(menuElement, () => {
+ picker = window.internals.pagePopupWindow.global.picker;
+ shouldBeEqualToString('picker._selectElement.value', '2');
+ shouldBeEqualToString('menuElement.value', 'baz');
+
+ var position = elementCenterPosition(picker._selectElement.children[2]);
+ eventSender.addTouchPoint(position[0], position[1]);
+ eventSender.touchStart();
+ shouldBeEqualToString('picker._selectElement.value', '2');
+
+ position = elementCenterPosition(picker._selectElement.children[0]);
+ eventSender.updateTouchPoint(0, position[0], position[1]);
+ eventSender.touchMove();
+ // The value is still 2 because children[0] is disabled.
+ shouldBeEqualToString('picker._selectElement.value', '2');
+
+ eventSender.releaseTouchPoint(0);
+ eventSender.touchEnd();
+
+ shouldNotBe('window.internals.pagePopupWindow', 'null');
+ shouldBeEqualToString('menuElement.value', 'baz');
+
+ test2();
+ }, function () {
+ testFailed('picker didn\'t open')
+ finishJSTest();
+ });
+}
+
function test2() {
+ debug("==> Test scrollable popup");
openPicker(menuElement2, function () {
picker = window.internals.pagePopupWindow.global.picker;
shouldBeEqualToString('picker._selectElement.value', '1');
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/select-popup/popup-menu-touch-operations-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698