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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp

Issue 2646493002: '*' is not a valid attribute selector (Closed)
Patch Set: Adjust serialization test Created 3 years, 11 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 | « third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp
index 4d2f3fb27c07716e4be1beaad5e893a63cef679c..9b36fc71d59d1f3e5d3ae6d6be8ee9da3bc60fe0 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp
@@ -331,4 +331,20 @@ TEST(CSSSelectorParserTest, ShadowPiercingCombinatorInStaticProfile) {
}
}
+TEST(CSSSelectorParserTest, AttributeSelectorUniversalInvalid) {
+ const char* testCases[] = {"[*]", "[*|*]"};
+
+ CSSParserContext* context = CSSParserContext::create(HTMLStandardMode);
+ StyleSheetContents* sheet = StyleSheetContents::create(context);
+
+ for (auto testCase : testCases) {
+ SCOPED_TRACE(testCase);
+ CSSTokenizer tokenizer(testCase);
+ CSSParserTokenRange range = tokenizer.tokenRange();
+ CSSSelectorList list =
+ CSSSelectorParser::parseSelector(range, context, sheet);
+ EXPECT_FALSE(list.isValid());
+ }
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698