4 <script src=
"../../resources/js-test.js"></script>
5 <script type=
"text/javascript">
6 description('Test for crbug.com/393504 :HTMLTextAreaElement.setSelectionRange should not change focus.');
7 window
.jsTestIsAsync
= true;
8 window
.onload = function () {
9 shouldBe("document.activeElement", "document.body");
10 input
.setSelectionRange(0, 0);
11 shouldBe("document.activeElement", "document.body");
12 input
.setSelectionRange(2, 3);
13 shouldBe("document.activeElement", "document.body");
14 text
.setSelectionRange(0, 0);
15 shouldBe("document.activeElement", "document.body");
16 text
.setSelectionRange(2, 3);
17 shouldBe("document.activeElement", "document.body");
18 window
.finishJSTest();
23 <input id=
"input" type=
"text" value=
"text1"/>
24 <textarea id=
"text" >text2
</textarea>