Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Issue 646893003: CSS Tokenizer: Comprehensive unit tests (Closed)

Created:
6 years, 2 months ago by Timothy Loh
Modified:
6 years, 2 months ago
Reviewers:
ikilpatrick, Yoav Weiss
CC:
blink-reviews, blink-reviews-css, ed+blinkwatch_opera.com, dglazkov+blink, apavlov+blink_chromium.org, darktears, rune+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

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 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184322

Patch Set 1 : #

Patch Set 2 : #

Total comments: 8

Patch Set 3 : git cl try #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : git cl try #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -151 lines) Patch
M Source/core/css/parser/CSSParserToken.h View 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/css/parser/CSSParserToken.cpp View 1 chunk +0 lines, -35 lines 0 comments Download
M Source/core/css/parser/CSSTokenizerTest.cpp View 1 2 3 4 3 chunks +285 lines, -115 lines 0 comments Download

Messages

Total messages: 14 (5 generated)
Timothy Loh
6 years, 2 months ago (2014-10-23 00:37:08 UTC) #3
Yoav Weiss
Absolutely awesome! I love the fact there's no test specific code in the implementation files ...
6 years, 2 months ago (2014-10-23 06:37:14 UTC) #4
Timothy Loh
https://codereview.chromium.org/646893003/diff/40001/Source/core/css/parser/CSSTokenizerTest.cpp File Source/core/css/parser/CSSTokenizerTest.cpp (right): https://codereview.chromium.org/646893003/diff/40001/Source/core/css/parser/CSSTokenizerTest.cpp#newcode30 Source/core/css/parser/CSSTokenizerTest.cpp:30: On 2014/10/23 06:37:14, Yoav Weiss wrote: > This might ...
6 years, 2 months ago (2014-10-23 16:17:58 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/646893003/80001
6 years, 2 months ago (2014-10-23 16:18:49 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/33327)
6 years, 2 months ago (2014-10-23 19:09:39 UTC) #9
ikilpatrick
lgtm https://codereview.chromium.org/646893003/diff/80001/Source/core/css/parser/CSSTokenizerTest.cpp File Source/core/css/parser/CSSTokenizerTest.cpp (right): https://codereview.chromium.org/646893003/diff/80001/Source/core/css/parser/CSSTokenizerTest.cpp#newcode203 Source/core/css/parser/CSSTokenizerTest.cpp:203: TEST_TOKENS("fun\\(ction(", function("fun(ction")); worth testing more esorteric names like: ...
6 years, 2 months ago (2014-10-23 22:24:02 UTC) #10
Timothy Loh
https://codereview.chromium.org/646893003/diff/80001/Source/core/css/parser/CSSTokenizerTest.cpp File Source/core/css/parser/CSSTokenizerTest.cpp (right): https://codereview.chromium.org/646893003/diff/80001/Source/core/css/parser/CSSTokenizerTest.cpp#newcode203 Source/core/css/parser/CSSTokenizerTest.cpp:203: TEST_TOKENS("fun\\(ction(", function("fun(ction")); On 2014/10/23 22:24:02, ikilpatrick wrote: > worth ...
6 years, 2 months ago (2014-10-24 00:29:01 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/646893003/100001
6 years, 2 months ago (2014-10-24 00:30:25 UTC) #13
commit-bot: I haz the power
6 years, 2 months ago (2014-10-24 01:27:55 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:100001) as 184322

Powered by Google App Engine
This is Rietveld 408576698