From b49102281f421b0c9d032bff72272b129680c48d Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 7 Jun 2012 10:04:20 +0200 Subject: [PATCH] Remove a few entries we now care about from the whitelist They are mostly about whitespace, but there is also a debatable quote test that outputs an empty bold element at the end of the line. We should perhaps strip this empty bold in the QuoteTransformer, as the preservation of an empty bold tag in round-tripping does not seem to be too useful. Change-Id: I1d8f3ebabcd9f6249e5170de420ba52e8aea22ca --- tests/parser/parserTests-whitelist.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/parser/parserTests-whitelist.js b/tests/parser/parserTests-whitelist.js index af35f2add0..851ec051b1 100644 --- a/tests/parser/parserTests-whitelist.js +++ b/tests/parser/parserTests-whitelist.js @@ -5,12 +5,10 @@ testWhiteList = {}; // Italic/link nesting is changed in this test, but the rendered result is the -// same. +// same. Currently the result is actually an improvement over the MediaWiki +// output. testWhiteList["Bug 2702: Mismatched , and tags are invalid"] = "

texttextSomething in italicSomething mixed, even boldNow both

"; -// Extra empty bold element. Needed for round-tripping? -testWhiteList["Unclosed and unmatched quotes"] = "

Bold italic text with bold deactivated in between.

Bold italic text with italic deactivated in between.

Bold text..

..spanning two paragraphs (should not work).

Bold tag left open

Italic tag left open

Normal text.

\nThis year's election should beat last year's.

Toms car is bigger than Susans.

"; - // The expected result for this test is really broken html. testWhiteList["Link containing double-single-quotes '' in text embedded in italics (bug 4598 sanity check)"] = "

Some pretty italics and stuff!

"; @@ -23,22 +21,25 @@ testWhiteList["5 quotes, code coverage +1 line"] = "

"; // supplies the old result without preformatting. testWhiteList["Bug 6200: Preformatted in
"] = "
\nBlah
"; - // empty table tags / with only a caption are legal in HTML5. testWhiteList["A table with no data."] = "
"; testWhiteList["A table with nothing but a caption"] = "
caption
"; testWhiteList["Fuzz testing: Parser22"] = "

http://===r:::https://b

"; +/** + * Small whitespace differences that we now start to care about for + * round-tripping + */ + // Very minor whitespace difference at end of cell (MediaWiki inserts a // newline before the close tag even if there was no trailing space in the cell) -testWhiteList["Table rowspan"] = "
Cell 1, row 1 Cell 2, row 1 (and 2) Cell 3, row 1
Cell 1, row 2 Cell 3, row 2
"; +//testWhiteList["Table rowspan"] = "
Cell 1, row 1 Cell 2, row 1 (and 2) Cell 3, row 1
Cell 1, row 2 Cell 3, row 2
"; // Inter-element whitespace only -testWhiteList["Indented table markup mixed with indented pre content (proposed in bug 6200)"] = " \n\n
\nText that should be rendered preformatted\n
"; +//testWhiteList["Indented table markup mixed with indented pre content (proposed in bug 6200)"] = " \n\n
\nText that should be rendered preformatted\n
"; - -/* Missing token transform functionality */ +/* Misc sanitizer / HTML5 differences */ // Single quotes are legal in HTML5 URIs. See // http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#url-manipulation-and-creation