CSS Tokenizer: Comprehensive unit tests
This patch adds comprehensive unit tests to the css-syntax based tokenizer. I've tried to cover all the edge cases I could think of here. A few cases don't work correctly, which I've left as commented out tests: - Idents starting with two dashes like --abc aren't parsed as idents - Escape should be replaced with U+FFFD when they represent either (U+0000), a surrogate codepoint (U+D800 - U+DFFF) or are larger than the maximum allowed codepoint (U+110000). - We don't correctly replace U+0000 with U+FFFD - Our handling of newline escapes (i.e. "check if two code points are a valid escape") is incorrect in some cases as we don't perform preprocessing. Note that there have been minor spec changes since the candidate rec and the tests here are based on the latest editor's draft. http://dev.w3.org/csswg/css-syntax BUG=424988 Review URL: https://codereview.chromium.org/646893003 git-svn-id: svn://svn.chromium.org/blink/trunk@184322 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
This diff is collapsed.
Please register or sign in to comment