| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | 3 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> |
| 4 <script> | 4 <script> |
| 5 if (window.testRunner) | 5 if (window.testRunner) |
| 6 testRunner.dumpEditingCallbacks(); | 6 testRunner.dumpEditingCallbacks(); |
| 7 </script> | 7 </script> |
| 8 | 8 |
| 9 <script> | 9 <script> |
| 10 function log(message) { | 10 function log(message) { |
| 11 var console = document.getElementById("console"); | 11 var console = document.getElementById("console"); |
| 12 var li = document.createElement("li"); | 12 var li = document.createElement("li"); |
| 13 var text = document.createTextNode(message); | 13 var text = document.createTextNode(message); |
| 14 | 14 |
| 15 console.appendChild(li); | 15 console.appendChild(li); |
| 16 li.appendChild(text); | 16 li.appendChild(text); |
| 17 } | 17 } |
| 18 | 18 |
| 19 function runTest() { | 19 function runTest() { |
| 20 if (window.testRunner) | 20 if (window.testRunner) |
| 21 testRunner.waitUntilDone(); | 21 testRunner.waitUntilDone(); |
| 22 // Let the subframe come into being. | 22 // Let the subframe come into being. |
| 23 window.setTimeout(step2, 100); | 23 window.setTimeout(step2, 100); |
| 24 e = document.getElementById("dragme"); | 24 e = document.getElementById("dragme"); |
| 25 setSelectionCommand(e, 0, e, 1); | 25 setSelectionCommand(e, 0, e, 0); |
| 26 } | 26 } |
| 27 | 27 |
| 28 function step2() | 28 function step2() |
| 29 { | 29 { |
| 30 if (!window.testRunner) { | 30 if (!window.testRunner) { |
| 31 log("This test uses the eventSender. To run it manually, drag the selec
ted image into the editable div and drop it. It should appear inside the editab
le div."); | 31 log("This test uses the eventSender. To run it manually, drag the selec
ted image into the editable div and drop it. It should appear inside the editab
le div."); |
| 32 return; | 32 return; |
| 33 } | 33 } |
| 34 | 34 |
| 35 log("Abe should appear twice, once inside the div and once outside it."); | 35 log("Abe should appear twice, once inside the div and once outside it."); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 52 </script> | 52 </script> |
| 53 </head> | 53 </head> |
| 54 | 54 |
| 55 <body style="padding:0; margin:0" onload="runTest();"> | 55 <body style="padding:0; margin:0" onload="runTest();"> |
| 56 | 56 |
| 57 <div id="target" style="border: 1px solid black; width: 300px; height: 120px;" c
ontenteditable="true"></div> | 57 <div id="target" style="border: 1px solid black; width: 300px; height: 120px;" c
ontenteditable="true"></div> |
| 58 <img id="dragme" src="../resources/abe.png"> | 58 <img id="dragme" src="../resources/abe.png"> |
| 59 | 59 |
| 60 <ul id="console"></ul> | 60 <ul id="console"></ul> |
| 61 </body> | 61 </body> |
| OLD | NEW |