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> |