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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/pasteboard/drag-list-item.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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 2
3 <body> 3 <body>
4 <script src="../../resources/dump-as-markup.js"></script> 4 <script src="../../resources/dump-as-markup.js"></script>
5 <script src="resources/select-and-drag.js"></script> 5 <script src="resources/select-and-drag.js"></script>
6 <div contenteditable="true"> 6 <div contenteditable="true">
7 <ol id="test"> 7 <ol id="test">
8 <li id="one">one</li><li id="two">two</li><li id="three">three</li><li id="four" >four</li> 8 <li id="one">one</li><li id="two">two</li><li id="three">three</li><li id="four" >four</li>
9 </ol> 9 </ol>
10 </div> 10 </div>
11 11
12 <script> 12 <script>
13 Markup.description('This test drags a selection of one <li> and drops them after another <li> in the first list. The same test is repeated in the second list bu t this time with two selected items instead of one. It verifies that the behavio r is independent of how many fully selected items we move, i.e. fully selected < li> are moved as <li> and not just as plain text'); 13 Markup.description('This test drags a selection of one <li> and drops them after another <li> in the first list. The same test is repeated in the second list bu t this time with two selected items instead of one. It verifies that the behavio r is independent of how many fully selected items we move, i.e. fully selected < li> are moved as <li> and not just as plain text');
14 14
15 if (window.testRunner) { 15 if (window.testRunner) {
16 16
17 selectListItems("two", "two", 4); 17 selectListItems("two", "two", 1);
18 Markup.dump("test", "The original list looks like this. 'two' is selected an d is going to be dropped after 'four'"); 18 Markup.dump("test", "The original list looks like this. 'two' is selected an d is going to be dropped after 'four'");
19 dragSelectionToTarget("two", "four"); 19 dragSelectionToTarget("two", "four");
20 Markup.dump("test", "'two' should appear as a new <li> after 'four'"); 20 Markup.dump("test", "'two' should appear as a new <li> after 'four'");
21 21
22 document.getElementById("test").innerHTML = "<li id=\"one\">one</li><li id=\ "two\">two</li>" 22 document.getElementById("test").innerHTML = "<li id=\"one\">one</li><li id=\ "two\">two</li>"
23 + "<li id=\"three\">three</li><li id=\"four\">four</li>"; 23 + "<li id=\"three\">three</li><li id=\"four\">four</li>";
24 selectListItems("two", "three", 5); 24 selectListItems("two", "three", 1);
25 Markup.dump("test", "The original list looks like this. 'two' and 'three' ar e selected and are going to be dropped after 'four'"); 25 Markup.dump("test", "The original list looks like this. 'two' and 'three' ar e selected and are going to be dropped after 'four'");
26 dragSelectionToTarget("two", "four"); 26 dragSelectionToTarget("two", "four");
27 Markup.dump("test", "'two' and 'three' should appear as <li> after 'four'"); 27 Markup.dump("test", "'two' and 'three' should appear as <li> after 'four'");
28 } 28 }
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698