|
Lines 29-36
function editingTest()
a/LayoutTests/editing/pasteboard/paste-list-004.html_sec1
|
| 29 |
pasteCommand(); |
29 |
pasteCommand(); |
| 30 |
|
30 |
|
| 31 |
// Place the cursor between "walking" and "cross" |
31 |
// Place the cursor between "walking" and "cross" |
| 32 |
for (var i = 0; i < 2; ++i) |
32 |
moveSelectionForwardByLineCommand(); |
| 33 |
moveSelectionForwardByLineCommand(); |
|
|
| 34 |
for (var i = 0; i < 2; ++i) |
33 |
for (var i = 0; i < 2; ++i) |
| 35 |
moveSelectionForwardByWordCommand(); |
34 |
moveSelectionForwardByWordCommand(); |
| 36 |
|
35 |
|
|
Lines 42-65
function editingTest()
a/LayoutTests/editing/pasteboard/paste-list-004.html_sec2
|
| 42 |
"one two", |
41 |
"one two", |
| 43 |
"three", |
42 |
"three", |
| 44 |
"one two", |
43 |
"one two", |
| 45 |
"", |
|
|
| 46 |
"four", |
44 |
"four", |
| 47 |
"monsters walking", |
45 |
"monsters walking", |
| 48 |
"one two", |
46 |
"one two", |
| 49 |
"", |
|
|
| 50 |
"cross the floor" |
47 |
"cross the floor" |
| 51 |
]; |
48 |
]; |
| 52 |
if (listItems.length != 9) |
49 |
if (listItems.length != 7) |
| 53 |
throw "Expected 8 list items, found " + listItems.length; |
50 |
throw "Expected 7 list items, found " + listItems.length; |
| 54 |
for (var i = 0; i < results.length; ++i) { |
51 |
for (var i = 0; i < results.length; ++i) { |
| 55 |
var actual = listItems[i].innerText.replace(/^\s+/g, ""); |
52 |
var actual = listItems[i].innerText.replace(/^\s+/g, ""); |
| 56 |
if (results[i] != actual) |
53 |
if (results[i] != actual) |
| 57 |
throw "Unexpected list item: " + i + "," + results[i] + "," + listItems[i].innerText; |
54 |
throw "Unexpected list item: " + i + "," + results[i] + "," + listItems[i].innerText; |
| 58 |
} |
55 |
} |
| 59 |
|
56 |
|
| 60 |
// Verify that the cursor is in the right place (on the blank line). |
57 |
// Verify that the cursor is in the right place (at the end of the pasted content). |
| 61 |
var selection = window.getSelection(); |
58 |
var selection = window.getSelection(); |
| 62 |
if (selection.baseNode != listItems[7] || selection.baseOffset != 0 || !selection.isCollapsed) |
59 |
if (selection.baseNode != listItems[6].firstChild.firstChild.firstChild || selection.baseOffset != 0 || !selection.isCollapsed) |
| 63 |
throw "Wrong selection position"; |
60 |
throw "Wrong selection position"; |
| 64 |
|
61 |
|
| 65 |
for (var i = 0; i < listItems.length; ++i) { |
62 |
for (var i = 0; i < listItems.length; ++i) { |