| Index: LayoutTests/fast/forms/selection-setSelectionRange-focusing.html
|
| diff --git a/LayoutTests/fast/forms/selection-setSelectionRange-focusing.html b/LayoutTests/fast/forms/selection-setSelectionRange-focusing.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bf437bdf38f84219d70fa12890fc0fe7eeecea16
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/forms/selection-setSelectionRange-focusing.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| +<script src="../../resources/js-test.js"></script>
|
| +<script type="text/javascript">
|
| +description('Test for crbug.com/393504 :HTMLTextAreaElement.setSelectionRange should not change focus.');
|
| +window.jsTestIsAsync = true;
|
| +window.onload = function () {
|
| + shouldBe("document.activeElement", "document.body");
|
| + input.setSelectionRange(0, 0);
|
| + shouldBe("document.activeElement", "document.body");
|
| + input.setSelectionRange(2, 3);
|
| + shouldBe("document.activeElement", "document.body");
|
| + text.setSelectionRange(0, 0);
|
| + shouldBe("document.activeElement", "document.body");
|
| + text.setSelectionRange(2, 3);
|
| + shouldBe("document.activeElement", "document.body");
|
| + window.finishJSTest();
|
| +}
|
| +</script>
|
| +</head>
|
| +<body>
|
| +<input id="input" type="text" value="text1"/>
|
| +<textarea id="text" >text2</textarea>
|
| +</body>
|
| +</html>
|
|
|