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 6596b8441ca4d28dc81146aca2720487281ee0b5..8de24d4839410fc733f8f9e841e9abd5f1a22a20 100644 |
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp |
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp |
@@ -133,4 +133,29 @@ TEST(CSSSelectorParserTest, ShadowDomPseudoInCompound) |
} |
} |
+TEST(CSSSelectorParserTest, PseudoElementsInCompoundLists) |
+{ |
+ const char* testCases[] = { |
+ ":not(::before)", |
+ ":not(::content)", |
+ ":not(::shadow)", |
+ ":host(::before)", |
+ ":host(::content)", |
+ ":host(::shadow)", |
+ ":host-context(::before)", |
+ ":host-context(::content)", |
+ ":host-context(::shadow)", |
+ ":-webkit-any(::after, ::before)", |
+ ":-webkit-any(::content, span)", |
+ ":-webkit-any(div, ::shadow)" |
+ }; |
+ |
+ for (auto testCase : testCases) { |
+ CSSTokenizer::Scope scope(testCase); |
+ CSSParserTokenRange range = scope.tokenRange(); |
+ CSSSelectorList list = CSSSelectorParser::parseSelector(range, CSSParserContext(HTMLStandardMode, nullptr), nullptr); |
+ EXPECT_FALSE(list.isValid()); |
+ } |
+} |
+ |
} // namespace |