Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/drag-selected-image-to-contenteditable.html

Issue 2693813002: Selection API: Some functions should throw InvalidNodeTypeError and IndexSizeError. (Closed)
Patch Set: adjust 2 more tests Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698