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

Unified Diff: third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html

Issue 2110783002: Open a color input with display:none via a label (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated test case as per review comments Created 4 years, 5 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/Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
diff --git a/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html b/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
new file mode 100644
index 0000000000000000000000000000000000000000..9ac452055ee4ed1455c53e649b3ee1e127d57740
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<input id="colorPick" type="color" />
+<label for="colorPick" id="labelPick">Pick a color</label>
+<script>
+test (function() {
+ assert_true(window.eventSender !== null);
+}, "window.eventSender is required for the test to run");
+
+test (function() {
+ var colorPicker = document.getElementById("colorPick");
+ colorPicker.style.display = "none";
+ var labelPick = document.getElementById("labelPick");
+ var x = labelPick.offsetLeft + labelPick.offsetWidth/2;
+ var y = labelPick.offsetTop + labelPick.offsetHeight/2;
+ eventSender.mouseMoveTo(x, y);
+ eventSender.mouseDown();
+ eventSender.mouseUp();
+ assert_true(testRunner.isChooserShown());
+}, "Tests click on label for color picker with display none should show chooser");
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/forms/ColorInputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698