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

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 testcase to include closure of popup when parent is removed Created 4 years, 6 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..f38e2bc15dbae87d19d57780b782dab58cfeb2b6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/forms/color/display-none-input-color-chooser-shown.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<div id="host">
+ <input id="colorPick" type="color" />
+ <label for="colorPick" id="labelPick">Pick a color</label>
+</div>
+<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());
+
+ var div = document.getElementById('host');
+ document.body.removeChild(div);
tkent 2016/07/01 06:54:08 In this case, HTMLInputElement::removedFrom() is c
ramya.v 2016/07/01 09:14:45 Can you please provide a test case of document des
tkent 2016/07/01 09:23:28 for example, 1. click a label associated to input
ramya.v 2016/07/01 10:05:50 Made below test case. <!DOCTYPE html> <input type
tkent 2016/07/04 01:25:59 Thank you for the investigation. So, this CL won'
ramya.v 2016/07/04 04:47:56 Filed a bug in crbug.com/625525. Done.
+ setTimeout(function() { assert_false(testRunner.isChooserShown()); }, 5000);
tkent 2016/07/01 06:54:08 This doesn't work. This is a sync test.
ramya.v 2016/07/01 09:14:45 Did not get you? Test case shows pass. Is this li
tkent 2016/07/01 09:23:28 I didn't try this patch. But this assert_false()
ramya.v 2016/07/01 10:05:50 Thanks got your point :) Will remove testing this
+}, "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