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

Side by Side Diff: LayoutTests/fast/forms/label/selection-disabled-label.html

Issue 722143002: Labels with user-select: none should pass events to control element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed Layout tests Created 6 years, 1 month 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 | LayoutTests/fast/forms/label/selection-disabled-label-expected.txt » ('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 <html>
3 <script src="../../../resources/js-test.js"></script>
4 <style>
5 span {
6 user-select: none;
7 -webkit-user-select: none;
8 }
9 </style>
10 <div>
11 Select, some text from this line!!!
12 </div>
13 <label class="label">
14 <input type="checkbox"/>
15 <span id='span'>Click Me</span>
16 </label>
17 <div id='console'></div>
18
19 <script>
20 description('Tests that the click event is passed when selection is disabaled' +
21 ' on label');
22
23 var span = document.getElementById('span');
24 testWithDoubleClick(span);
25 shouldBeEqualToString('window.getSelection().toString()', '');
26
27 var div = document.querySelector('div');
28 testWithDoubleClick(div);
29 shouldBeEqualToString('window.getSelection().toString()', 'Select');
30
31 shouldBeFalse("document.querySelector('input').checked");
32
33 span.click();
34 shouldBeTrue("document.querySelector('input').checked");
35
36 span.click();
37 shouldBeFalse("document.querySelector('input').checked");
38
39 div.style.display = 'none';
40 span.style.display = 'none';
41
42 function testWithDoubleClick(element)
43 {
44 eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
45 eventSender.mouseDown();
46 eventSender.mouseUp();
47 eventSender.mouseDown();
48 eventSender.mouseUp();
49 }
50 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/forms/label/selection-disabled-label-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698