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

Side by Side Diff: LayoutTests/fast/events/label-click.html

Issue 291243002: Never ignore HTMLLabelElement's click() calls (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
tkent 2014/05/21 00:35:49 The test is <label>-specific. I prefer putting th
Xianzhu 2014/05/21 15:58:53 Done.
2 <script src="../../resources/js-test.js"></script>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
tkent 2014/05/21 00:35:49 This line is unnecessary. js-test.js calls dumpAs
Xianzhu 2014/05/21 15:58:53 Done.
6
7 window.onload = function() {
8 var checkbox = document.getElementById('checkbox');
9 var label = document.getElementById('label');
10
11 shouldBeFalse('checkbox.checked');
12
13 if (window.eventSender) {
14 eventSender.mouseMoveTo(label.offsetLeft, label.offsetTop);
15
16 eventSender.mouseDown();
17 eventSender.mouseUp();
18 shouldBeTrue('checkbox.checked');
19
20 eventSender.leapForward(1000);
21 eventSender.mouseDown();
22 eventSender.mouseUp();
23 shouldBeFalse('checkbox.checked');
24 }
25
26 label.click();
27 shouldBeTrue('checkbox.checked');
28
29 label.click();
30 shouldBeFalse('checkbox.checked');
31
32 window.getSelection().selectAllChildren(label);
33 label.click();
34 shouldBeTrue('checkbox.checked');
35
36 label.click();
37 shouldBeFalse('checkbox.checked');
38 };
39 </script>
40 <input id="checkbox" type="checkbox">
41 <label id="label" for="checkbox">Label</label>
42 <div id="console"></div>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/events/label-click-expected.txt » ('j') | Source/core/html/HTMLLabelElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698