OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body style="visibility: hidden;"> | 3 <body style="visibility: hidden;"> |
4 <div style="visibility: visible;"> | 4 <div style="visibility: visible;"> |
5 <p>This tests pasting (InsertHTML) into an input element when body element has v
isibility set to hidden. | 5 <p>This tests pasting (InsertHTML) into an input element when body element has v
isibility set to hidden. |
6 You should see PASS below.</p> | 6 You should see PASS below.</p> |
7 <input type="text" value="FAIL"> | 7 <input type="text" value="FAIL"> |
8 <p><script> | 8 <p><script> |
9 | 9 |
10 if (window.testRunner) | 10 if (window.testRunner) |
11 testRunner.dumpAsText(); | 11 testRunner.dumpAsText(); |
12 | 12 |
13 var input = document.querySelector('input'); | 13 var input = document.querySelector('input'); |
14 input.focus(); | 14 input.select(); |
15 document.execCommand('InsertHTML', false, 'PASS'); | 15 document.execCommand('InsertHTML', false, 'PASS'); |
16 | 16 |
17 document.write(input.value); | 17 document.write(input.value); |
18 | 18 |
19 </script></p> | 19 </script></p> |
20 </div> | 20 </div> |
21 </body> | 21 </body> |
22 </html> | 22 </html> |
OLD | NEW |