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

Side by Side Diff: LayoutTests/editing/selection/4975120.html

Issue 392573002: HTMLTextAreaElement.setSelectionRange should not change focus. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename FocusOption 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
1 <head> 1 <head>
2 <script> 2 <script>
3 if (window.testRunner) 3 if (window.testRunner)
4 window.testRunner.waitUntilDone(); 4 window.testRunner.waitUntilDone();
5 5
6 function runTest() { 6 function runTest() {
7 var input = document.getElementById("input"); 7 var input = document.getElementById("input");
8 input.focus();
8 input.setSelectionRange(0, 3); 9 input.setSelectionRange(0, 3);
9 var frame = frames[0]; 10 var frame = frames[0];
10 frame.focus(); 11 frame.focus();
11 frame.getSelection().collapse(frame.document.body, 0); 12 frame.getSelection().collapse(frame.document.body, 0);
12 13
13 if (!window.testRunner) 14 if (!window.testRunner)
14 return; 15 return;
15 16
16 window.testRunner.setWindowIsKey(false); 17 window.testRunner.setWindowIsKey(false);
17 window.testRunner.setWindowIsKey(true); 18 window.testRunner.setWindowIsKey(true);
18 window.testRunner.notifyDone(); 19 window.testRunner.notifyDone();
19 } 20 }
20 </script> 21 </script>
21 </head> 22 </head>
22 <body> 23 <body>
23 <p>This tests for a bug that caused the parent of an active frame to paint as th ough it were active when its window becomes key. To run manually, make another window active and then make this window active. Only the subframe should appear active.</p> 24 <p>This tests for a bug that caused the parent of an active frame to paint as th ough it were active when its window becomes key. To run manually, make another window active and then make this window active. Only the subframe should appear active.</p>
24 <input id="input" type="text" value="foo"><br> 25 <input id="input" type="text" value="foo"><br>
25 <iframe src="../resources/contenteditable-iframe-src.html" onload="runTest()"></ iframe></body> 26 <iframe src="../resources/contenteditable-iframe-src.html" onload="runTest()"></ iframe></body>
26 27
27 <script> 28 <script>
28 </script> 29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698