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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../../resources/testharness.js"></script>
3 <script src="../../../resources/testharnessreport.js"></script>
4 <input id="colorPick" type="color" />
5 <label for="colorPick" id="labelPick">Pick a color</label>
6 <script>
7 test (function() {
8 assert_true(window.eventSender !== null);
9 }, "window.eventSender is required for the test to run");
10
11 test (function() {
12 var colorPicker = document.getElementById("colorPick");
13 colorPicker.style.display = "none";
14 var labelPick = document.getElementById("labelPick");
15 var x = labelPick.offsetLeft + labelPick.offsetWidth/2;
16 var y = labelPick.offsetTop + labelPick.offsetHeight/2;
17 eventSender.mouseMoveTo(x, y);
18 eventSender.mouseDown();
19 eventSender.mouseUp();
20 assert_true(testRunner.isChooserShown());
21 }, "Tests click on label for color picker with display none should show chooser" );
22 </script>
OLDNEW
« 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