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

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

Issue 392573002: HTMLTextAreaElement.setSelectionRange should not change focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests Created 6 years, 5 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <script type="text/javascript">
6 description('Test for crbug.com/393504 :HTMLTextAreaElement.setSelectionRange sh ould 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();
19 }
20 </script>
21 </head>
22 <body>
23 <input id="input" type="text" value="text1"/>
24 <textarea id="text" >text2</textarea>
25 </body>
26 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698