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

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

Issue 556813002: Fix behavior of label associated with control element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressing comments Created 6 years, 3 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <script src="../../../resources/js-test.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 4
5 <body> 5 <body>
6 <label id="labelWithInput" for="inputText">Some, Text associated with input</lab el> 6 <label id="labelWithInput" for="inputText">Some, Text associated with input</lab el>
7 <input id="inputText" type="text"> 7 <input id="inputText" type="text">
8 </body> 8 </body>
9 9
10 <script> 10 <script>
11 description('Test the selection of label associated with input.'); 11 description('Test the selection of label associated with input.');
12 12
13 var labelElement = document.getElementById('labelWithInput'); 13 var labelElement = document.getElementById('labelWithInput');
14 testWithDoubleClick(labelElement); 14 testWithDoubleClick(labelElement);
15 15
16 shouldBeEqualToString('window.getSelection().toString()', 'Some'); 16 shouldBeEqualToString('window.getSelection().toString()', 'Some');
17 17
18 labelElement.style.display = 'none'; 18 labelElement.style.display = 'none';
19 19
20 function testWithDoubleClick(element) 20 function testWithDoubleClick(element)
21 { 21 {
22 eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop); 22 eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop);
23 eventSender.mouseDown(); 23 eventSender.mouseDown();
24 eventSender.mouseUp(); 24 eventSender.mouseUp();
25 eventSender.mouseDown(); 25 eventSender.mouseDown();
26 eventSender.mouseUp(); 26 eventSender.mouseUp();
27 } 27 }
28 </script> 28 </script>
29 </html> 29 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698