| OLD | NEW |
| 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> |
| OLD | NEW |