OLD | NEW |
1 <div id="test" onpaste="paste(event)">This test verifies that we can get types f
rom the clipboard | 1 <body onpaste="paste(event)"> |
| 2 <div id="test">This test verifies that we can get types from the clipboard |
2 during an onpaste event. This test requires DRT.</div> | 3 during an onpaste event. This test requires DRT.</div> |
3 | 4 |
4 <div id="results">FAIL</div> | 5 <div id="results">FAIL</div> |
5 | 6 |
6 <script src="../editing.js"></script> | 7 <script src="../editing.js"></script> |
7 <script> | 8 <script> |
8 function paste(ev) | 9 function paste(ev) |
9 { | 10 { |
10 var types = ev.clipboardData.types; | 11 var types = ev.clipboardData.types; |
11 if (types.indexOf('text/plain') >= 0 && | 12 if (types.indexOf('text/plain') >= 0 && |
12 types.indexOf('text/html') >= 0) | 13 types.indexOf('text/html') >= 0) |
13 document.getElementById("results").innerHTML = "PASS"; | 14 document.getElementById("results").innerHTML = "PASS"; |
14 } | 15 } |
15 | 16 |
16 function editingTest() | 17 function editingTest() |
17 { | 18 { |
18 var selection = window.getSelection(); | 19 var selection = window.getSelection(); |
19 selection.modify("extend", "forward", "sentence"); | 20 selection.modify("extend", "forward", "sentence"); |
20 copyCommand(); | 21 copyCommand(); |
21 | 22 |
22 pasteCommand(); | 23 pasteCommand(); |
23 } | 24 } |
24 | 25 |
25 runDumpAsTextEditingTest(false); | 26 runDumpAsTextEditingTest(false); |
26 </script> | 27 </script> |
| 28 </body> |
OLD | NEW |