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 | 6 |
7 function testRemoveFormat(initialContents, selector, expected) | 7 function testRemoveFormat(initialContents, selector, expected) |
8 { | 8 { |
9 testContainer.innerHTML = initialContents; | 9 testContainer.innerHTML = initialContents; |
10 var selected = selector(testContainer); | 10 var selected = selector(testContainer); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 testRemoveFormat('<b><div>hello world</div></b><div>WebKit</div>', selectLastTwo
Words, '<div><b>hello </b>world</div><div>WebKit</div>'); | 64 testRemoveFormat('<b><div>hello world</div></b><div>WebKit</div>', selectLastTwo
Words, '<div><b>hello </b>world</div><div>WebKit</div>'); |
65 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectLastTwoWord
s, '<div><q><b>hello </b></q>world</div>WebKit'); | 65 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectLastTwoWord
s, '<div><q><b>hello </b></q>world</div>WebKit'); |
66 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectSecondWord,
'<div><q><b>hello </b></q>world</div><q>WebKit</q>'); | 66 testRemoveFormat('<q><b><div>hello world</div></b>WebKit</q>', selectSecondWord,
'<div><q><b>hello </b></q>world</div><q>WebKit</q>'); |
67 | 67 |
68 testRemoveFormat('<i style="font-weight:bold;">hello</i> <u>world</u>', selectAl
l, 'hello world'); | 68 testRemoveFormat('<i style="font-weight:bold;">hello</i> <u>world</u>', selectAl
l, 'hello world'); |
69 testRemoveFormat('<font color="red"><b style="font-size: large;"><u>hello</u> wo
rld</b> WebKit</font>', | 69 testRemoveFormat('<font color="red"><b style="font-size: large;"><u>hello</u> wo
rld</b> WebKit</font>', |
70 selectSecondWord, '<font color="red"><b style="font-size: large;"><u>hello</
u> </b></font>world<font color="red"> WebKit</font>'); | 70 selectSecondWord, '<font color="red"><b style="font-size: large;"><u>hello</
u> </b></font>world<font color="red"> WebKit</font>'); |
71 testRemoveFormat('<font size="5"><i><u style="font-size: small;">hello</u> world
</i><font size="3"> WebKit</font></font>', | 71 testRemoveFormat('<font size="5"><i><u style="font-size: small;">hello</u> world
</i><font size="3"> WebKit</font></font>', |
72 selectSecondWord, '<font size="5"><i><u style="font-size: small;">hello</u>
</i></font>world<font size="5"><font size="3"> WebKit</font></font>'); | 72 selectSecondWord, '<font size="5"><i><u style="font-size: small;">hello</u>
</i></font>world<font size="5"><font size="3"> WebKit</font></font>'); |
73 testRemoveFormat('<sup><div style="text-decoration: underline; font-size: large;
">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>', | 73 testRemoveFormat('<sup><div style="text-decoration: underline; font-size: large;
">hello <dfn style="font-size: normal;">world</dfn></div> WebKit</sup>', |
74 selectSecondWord, '<div><sup><font size="4"><u>hello </u></font></sup>world<
/div><sup> WebKit</sup>'); | 74 selectSecondWord, '<div><sup><font class="Apple-style-span" size="4"><u>hell
o </u></font></sup>world</div><sup> WebKit</sup>'); |
75 | 75 |
76 document.body.removeChild(testContainer); | 76 document.body.removeChild(testContainer); |
77 | 77 |
78 var successfullyParsed = true; | 78 var successfullyParsed = true; |
OLD | NEW |