Chromium Code Reviews| Index: LayoutTests/fast/forms/label/label-selection.html |
| diff --git a/LayoutTests/fast/forms/label/label-selection.html b/LayoutTests/fast/forms/label/label-selection.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..2f5747c77884c2b16bed3e278238200dba8d70d5 |
| --- /dev/null |
| +++ b/LayoutTests/fast/forms/label/label-selection.html |
| @@ -0,0 +1,30 @@ |
| +<!DOCTYPE html> |
| +<html> |
| + <script src="../../../resources/js-test.js"></script> |
|
keishi
2014/05/02 07:52:03
I think form tests generally don't indent after <h
deepak.sa
2014/05/02 08:28:27
Done.
|
| +<body> |
| + <label id="labelWithInput" for="inputText">Some Text associated with input</label> |
|
keishi
2014/05/02 07:52:03
Ditto.
deepak.sa
2014/05/02 08:28:27
Done.
|
| + <input id="inputText" type='text'> |
| +</body> |
| + |
| +<script> |
| + description("Test the selection of label associated with input."); |
| + if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + var labelElement = document.getElementById("labelWithInput"); |
| + |
| + testWithDoubleClick(labelElement); |
| + shouldBeEqualToString('window.getSelection().toString()', "Some"); |
|
keishi
2014/05/02 07:52:03
We shouldn't mix single and double quotes. We try
deepak.sa
2014/05/02 08:28:27
Done.
|
| + |
| + labelElement.style.display = "none"; |
| +} |
|
keishi
2014/05/02 07:52:03
Indentation is messed up.
deepak.sa
2014/05/02 08:28:27
Done.
|
| + |
| +function testWithDoubleClick(element) |
| +{ |
|
keishi
2014/05/02 07:52:03
I think form tests generally don't break before cu
deepak.sa
2014/05/02 08:28:27
Sorry, but i am not able to follow the above comme
keishi
2014/05/02 08:48:34
I was talking about the line break between line 21
|
| + eventSender.mouseMoveTo(element.offsetLeft, element.offsetTop); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| + eventSender.mouseDown(); |
| + eventSender.mouseUp(); |
| +} |
| +</script> |
| +</html> |