blob: ad33a5f2cdfaf0e06283a62ba68d18943ac5db2f [file] [log] [blame]
Unit tests for SimplifiedBackwardsTextIterator. It currently shows a bug that it generates an extra new line at the beginning.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS plainTextWithTextIterator("<div>hello</div>world") is "hello\nworld"
PASS plainTextWithBackwardsTextIterator("<div>hello</div>world") is "\nhello\nworld"
PASS plainTextWithTextIterator("<div>hello</div><div>world</div>") is "hello\nworld"
PASS plainTextWithBackwardsTextIterator("<div>hello</div><div>world</div>") is "\nhello\nworld"
PASS plainTextWithTextIterator("<div><b>h</b>ello <span>world</span></div>WebKit") is "hello world\nWebKit"
PASS plainTextWithBackwardsTextIterator("<div><b>h</b>ello <span>world</span></div>WebKit") is "\nhello world\nWebKit"
PASS plainTextWithTextIterator("hello<br>world<br>") is "hello\nworld\n"
PASS plainTextWithBackwardsTextIterator("hello<br>world<br>") is "hello\nworld"
PASS plainTextWithTextIterator("<ul><li>hello<li>world</ul>WebKit") is "hello\nworld\nWebKit"
PASS plainTextWithBackwardsTextIterator("<ul><li>hello<li>world</ul>WebKit") is "\n\nhello\nworld\nWebKit"
PASS plainTextWithTextIterator("<table><tr><td>hello</td><td>world</td></table>") is "hello world"
PASS plainTextWithBackwardsTextIterator("<table><tr><td>hello</td><td>world</td></table>") is "\n\nhello\nworld"
PASS successfullyParsed is true
TEST COMPLETE