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

Unified Diff: Source/core/css/parser/SizesAttributeParserTest.cpp

Issue 300843008: Clean up SizesAttributeParserTest and add some tests (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/SizesAttributeParserTest.cpp
diff --git a/Source/core/css/parser/SizesAttributeParserTest.cpp b/Source/core/css/parser/SizesAttributeParserTest.cpp
index e8765b07777310aad7f4f6b4e1588a75f3f63de2..fe24ccd5077db23131402687431ccfd99255c0b6 100644
--- a/Source/core/css/parser/SizesAttributeParserTest.cpp
+++ b/Source/core/css/parser/SizesAttributeParserTest.cpp
@@ -18,9 +18,6 @@ typedef struct {
TEST(SizesAttributeParserTest, Basic)
{
- // The first string represents the input string.
- // The second string represents the output string, if present.
- // Otherwise, the output string is identical to the first string.
TestCase testCases[] = {
{"screen", 500},
{"(min-width:500px)", 500},
@@ -52,7 +49,10 @@ TEST(SizesAttributeParserTest, Basic)
{"(min-width:5000px) calc(5000px/10), (min-width:500px) calc(1200px/3)", 400},
{"(min-width:500px) calc(1200/3)", 500},
{"(min-width:500px) calc(1200px/(0px*14))", 500},
- // FIXME - test all other units, zero length and calc().
+ {"(max-width: 3000px) 200px, 400px", 200},
+ {"(max-width: 3000px) 20em, 40em", 320},
+ {"(max-width: 3000px) 0, 40em", 0},
+ {"(max-width: 3000px) 50vw, 40em", 250},
{0, 0} // Do not remove the terminator line.
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698