OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style type="text/css"> | 4 <style type="text/css"> |
5 div { display: none; } | 5 div { display: none; } |
6 </style> | 6 </style> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <p>This tests pasting (InsertHTML) into an input element with a CSS rule div { d
isplay: none}. | 9 <p>This tests pasting (InsertHTML) into an input element with a CSS rule div { d
isplay: none}. |
10 You should see PASS below.</p> | 10 You should see PASS below.</p> |
11 <input type="text" value="FAIL"> | 11 <input type="text" value="FAIL"> |
12 <p><script> | 12 <p><script> |
13 | 13 |
14 if (window.testRunner) | 14 if (window.testRunner) |
15 testRunner.dumpAsText(); | 15 testRunner.dumpAsText(); |
16 | 16 |
17 var input = document.querySelector('input'); | 17 var input = document.querySelector('input'); |
18 input.focus(); | 18 input.focus(); |
| 19 input.select(); |
19 document.execCommand('InsertHTML', false, 'PASS'); | 20 document.execCommand('InsertHTML', false, 'PASS'); |
20 | 21 |
21 document.write(input.value); | 22 document.write(input.value); |
22 | 23 |
23 </script></p> | 24 </script></p> |
24 </body> | 25 </body> |
25 </html> | 26 </html> |
OLD | NEW |