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

Unified Diff: Source/core/css/CSSParserValuesTest.cpp

Issue 204333005: Fix an MQ parsing related crash (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added a test Created 6 years, 9 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/CSSParserValues.h ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSParserValuesTest.cpp
diff --git a/Source/core/css/CSSParserValuesTest.cpp b/Source/core/css/CSSParserValuesTest.cpp
index 41ad43ccc2b812e275c378e243af80ca9036cd92..7e4341189fea4e4a767ca8f5ceb2b8c4307406e0 100644
--- a/Source/core/css/CSSParserValuesTest.cpp
+++ b/Source/core/css/CSSParserValuesTest.cpp
@@ -84,4 +84,17 @@ TEST(CSSParserValuesTest, EqualIgnoringCase16BitsString)
ASSERT_FALSE(cssParserString.equalIgnoringCase("abCD"));
}
+TEST(CSSParserValuesTest, CSSParserValuelistClear)
+{
+ CSSParserValueList list;
+ for (int i = 0; i < 3; ++i) {
+ CSSParserValue value;
+ value.setFromNumber(3);
+ list.addValue(value);
+ }
+ list.clear();
+ ASSERT_FALSE(list.size());
+ ASSERT_FALSE(list.currentIndex());
+}
+
} // namespace
« no previous file with comments | « Source/core/css/CSSParserValues.h ('k') | Source/core/css/MediaQueryExp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698