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

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

Issue 236713005: Use SizesAttributeParser to get the right srcset resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sizes_parser8
Patch Set: Fixed nits Created 6 years, 8 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 | « Source/core/css/parser/SizesAttributeParser.cpp ('k') | Source/core/html/HTMLImageElement.h » ('j') | 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 7a01053c72e039d460be9d5efbccc873696eebf3..b570640c4d7accf27720c7097a99434617c9a7ca 100644
--- a/Source/core/css/parser/SizesAttributeParserTest.cpp
+++ b/Source/core/css/parser/SizesAttributeParserTest.cpp
@@ -36,6 +36,7 @@ TEST(SizesAttributeParserTest, Basic)
{"300px, 400px", 300},
{"(min-width:5000px) 200px, (min-width:500px) 400px", 400},
{"", 500},
+ {" ", 500},
{" /**/ ", 500},
{" /**/ 300px", 300},
{"300px /**/ ", 300},
@@ -46,6 +47,7 @@ TEST(SizesAttributeParserTest, Basic)
{"asdf, 200px", 200},
{"(max-width: 3000px) 200w, 400w", 500},
{",, , /**/ ,200px", 200},
+ {"50vw", 250},
// FIXME - test all other units, zero length and calc().
{0, 0} // Do not remove the terminator line.
};
« no previous file with comments | « Source/core/css/parser/SizesAttributeParser.cpp ('k') | Source/core/html/HTMLImageElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698