OLD | NEW |
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> |
OLD | NEW |