OLD | NEW |
1 description("This tests removing multiple elements by RemoveFormat command.") | 1 description("This tests removing multiple elements by RemoveFormat command.") |
2 | 2 |
3 var testContainer = document.createElement("div"); | 3 var testContainer = document.createElement("div"); |
4 testContainer.contentEditable = true; | 4 testContainer.contentEditable = true; |
5 document.body.appendChild(testContainer); | 5 document.body.appendChild(testContainer); |
6 if (window.internals) | 6 if (window.internals) |
7 internals.settings.setEditingBehavior("mac"); | 7 internals.settings.setEditingBehavior("mac"); |
8 | 8 |
9 function testRemoveFormat(initialContents, selector, expected) | 9 function testRemoveFormat(initialContents, selector, expected) |
10 { | 10 { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 testRemoveFormat('<b><div>hello world</div></b><div>WebKit</div>', selectLastTwo
Words, '<div><b>hello </b>world</div><div>WebKit</div>'); | 72 testRemoveFormat('<b><div>hello world</div></b><div>WebKit</div>', selectLastTwo
Words, '<div><b>hello </b>world</div><div>WebKit</div>'); |
73 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectLastTwoWord
s, '<div><q><b>hello </b></q>world</div>WebKit'); | 73 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectLastTwoWord
s, '<div><q><b>hello </b></q>world</div>WebKit'); |
74 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectSecondWord,
'<div><q><b>hello </b></q>world</div><q>WebKit</q>'); | 74 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectSecondWord,
'<div><q><b>hello </b></q>world</div><q>WebKit</q>'); |
75 testRemoveFormat('<b><div>hello</div>webkit</b>', selectFirstLine, '<div>hello</
div><b>webkit</b>'); | 75 testRemoveFormat('<b><div>hello</div>webkit</b>', selectFirstLine, '<div>hello</
div><b>webkit</b>'); |
76 | 76 |
77 testRemoveFormat('<i style="font-weight:bold;">hello</i> <u>world</u>', selectAl
l, 'hello world'); | 77 testRemoveFormat('<i style="font-weight:bold;">hello</i> <u>world</u>', selectAl
l, 'hello world'); |
78 testRemoveFormat('<font color="red"><b style="font-size: large;"><u>hello</u> wo
rld</b> WebKit</font>', | 78 testRemoveFormat('<font color="red"><b style="font-size: large;"><u>hello</u> wo
rld</b> WebKit</font>', |
79 selectSecondWord, '<font color="red"><b style="font-size: large;"><u>hello</
u> </b></font>world<font color="red"> WebKit</font>'); | 79 selectSecondWord, '<font color="red"><b style="font-size: large;"><u>hello</
u> </b></font>world<font color="red"> WebKit</font>'); |
80 testRemoveFormat('<font size="5"><i><u style="font-size: small;">hello</u> world
</i><font size="3"> WebKit</font></font>', | 80 testRemoveFormat('<font size="5"><i><u style="font-size: small;">hello</u> world
</i><font size="3"> WebKit</font></font>', |
81 selectSecondWord, '<font size="5"><i><u style="font-size: small;">hello</u>
</i></font>world<font size="5"><font size="3"> WebKit</font></font>'); | 81 selectSecondWord, '<font size="5"><i><u style="font-size: small;">hello</u>
</i></font>world<font size="5"><font size="3"> WebKit</font></font>'); |
82 testRemoveFormat('<sup><div style="text-decoration: underline; font-size: large;
">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>', | 82 testRemoveFormat('<sup><div style="text-decoration-line: underline; font-size: l
arge;">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>', |
83 selectSecondWord, '<div><sup><font size="4"><u>hello </u></font></sup>world<
/div><sup> WebKit</sup>'); | 83 selectSecondWord, '<div><sup><font size="4"><u>hello </u></font></sup>world<
/div><sup> WebKit</sup>'); |
84 | 84 |
85 document.body.removeChild(testContainer); | 85 document.body.removeChild(testContainer); |
86 | 86 |
87 var successfullyParsed = true; | 87 var successfullyParsed = true; |
OLD | NEW |