Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <script src="../../../resources/js-test.js"></script> | |
| 4 | |
| 5 <body> | |
| 6 <label id="labelWithInput" for="inputText">Some Text associated with input</labe l> | |
| 7 <input id="inputText" type="text"> | |
| 8 </body> | |
| 9 | |
| 10 <script> | |
| 11 description('Test the selection of label associated with input.'); | |
| 12 | |
| 13 if (window.testRunner) { | |
| 14 testRunner.dumpAsText(); | |
|
keishi
2014/05/02 08:48:35
Don't need this. This is done automatically in js-
deepak.sa
2014/05/02 12:55:31
Done.
| |
| 15 | |
| 16 var labelElement = document.getElementById('labelWithInput'); | |
| 17 testWithDoubleClick(labelElement); | |
| 18 | |
| 19 shouldBeEqualToString('window.getSelection().toString()', 'Some'); | |
| 20 | |
| 21 labelElement.style.display = 'none'; | |
| 22 } | |
| 23 | |
| 24 function testWithDoubleClick(element) | |
| 25 { | |
| 26 eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop); | |
| 27 eventSender.mouseDown(); | |
| 28 eventSender.mouseUp(); | |
| 29 eventSender.mouseDown(); | |
| 30 eventSender.mouseUp(); | |
| 31 } | |
| 32 </script> | |
| 33 </html> | |
| OLD | NEW |