blob: 13cd5f5b8c7a316cbe7a7a32682dfdd3ee005ed8 [file] [log] [blame]
Test to make sure we preserve styles when removing links
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS unlink on all of "hello <b>world</b>" yields "hello <b>world</b>"
PASS unlink on all of "<a href="http://webkit.org/"><u>hello world</u></a>" yields "<u>hello world</u>"
PASS unlink on all of "hello <i><a href="http://webkit.org/">world</a></i>" yields "hello <i>world</i>"
PASS unlink on all of "hello <a href="http://webkit.org/" style="font-weight: bold;">world</a>" yields "hello <b>world</b>"
PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue;">world</a> WebKit" yields "hello <font color="#0000ff">world</font> WebKit"
PASS unlink on all of "hello <a href="http://webkit.org/" style="color: blue; display: block;">world</a> WebKit" yields "hello <font color="#0000ff"><span style="display: block;">world</span></font> WebKit"
PASS unlink on last two words of "<a href="http://webkit.org/" style="font-size: large;">hello world</a> WebKit" yields "<a href="http://webkit.org/" style="font-size: large;">hello </a><font size="4">world</font> WebKit"
PASS unlink on last two words of "hello <a href="http://webkit.org/" style="font-size: large;">world <span style="font-size: small;">WebKit</span> rocks</a>" yields "hello <a href="http://webkit.org/"><font size="4">world </font></a><span style="font-size: small;">WebKit</span><font size="4"> rocks</font>"
PASS unlink on first two words of "hello <a href="http://webkit.org/" style="font-style: italic;"><b>world</b> WebKit</a>" yields "hello <b style="font-style: italic;">world</b> <a href="http://webkit.org/" style="font-style: italic;">WebKit</a>"
PASS unlink on all of "<a href="http://webkit.org/" style="background-color: yellow;"><div>hello</div><div>world</div></a>" yields "<div style="background-color: yellow;">hello</div><div style="background-color: yellow;">world</div>"
PASS unlink on all of "hello<a href="http://webkit.org/" style="background-color: yellow;"><div>world</div></a>WebKit" yields "hello<div style="background-color: yellow;">world</div><span style="background-color: yellow;">WebKit</span>"
PASS unlink on last two words of "<a href="http://webkit.org/" style="font-weight: bold;"><div>hello</div><div>world WebKit</div></a>" yields "<a href="http://webkit.org/"><div style="font-weight: bold;">hello</div></a><div style="font-weight: bold;">world WebKit</div>"
PASS unlink on last word of "<a href="http://webkit.org/" style="font-weight: bold;"><div style="font-weight: normal;">hello</div><div>world</div></a>" yields "<a href="http://webkit.org/"><div style="font-weight: normal;">hello</div></a><div style="font-weight: bold;">world</div>"
PASS successfullyParsed is true
TEST COMPLETE