| Index: Source/core/css/parser/CSSSelectorParserTest.cpp
|
| diff --git a/Source/core/css/parser/CSSSelectorParserTest.cpp b/Source/core/css/parser/CSSSelectorParserTest.cpp
|
| index b3a52cd2b4daeb0bca50aea7f07edd5b26cd8ea2..fe9dbbd7b4dbcdfe489fce692d7e5fcc52058d09 100644
|
| --- a/Source/core/css/parser/CSSSelectorParserTest.cpp
|
| +++ b/Source/core/css/parser/CSSSelectorParserTest.cpp
|
| @@ -5,6 +5,7 @@
|
| #include "config.h"
|
| #include "core/css/parser/CSSSelectorParser.h"
|
|
|
| +#include "core/css/CSSSelectorList.h"
|
| #include "core/css/parser/CSSTokenizer.h"
|
| #include <gtest/gtest.h>
|
|
|
| @@ -112,4 +113,24 @@ TEST(CSSSelectorParserTest, InvalidANPlusB)
|
| }
|
| }
|
|
|
| +TEST(CSSSelectorParserTest, ContentPseudoInCompound)
|
| +{
|
| + const char* testCases[][2] = {
|
| + { "::content", "*::content" }, // crbug.com/478969
|
| + { ".a::content", ".a::content" },
|
| + { "::content.a", ".a::content" },
|
| + { "::content.a.b", ".b.a::content" },
|
| + { ".a::content.b", ".b.a::content" },
|
| + };
|
| +
|
| + for (unsigned i = 0; i < WTF_ARRAY_LENGTH(testCases); ++i) {
|
| + SCOPED_TRACE(testCases[i][0]);
|
| + CSSTokenizer::Scope scope(testCases[i][0]);
|
| + CSSParserTokenRange range = scope.tokenRange();
|
| + CSSSelectorList list;
|
| + CSSSelectorParser::parseSelector(range, CSSParserContext(HTMLStandardMode, nullptr), nullAtom, nullptr, list);
|
| + EXPECT_STREQ(testCases[i][1], list.selectorsText().ascii().data());
|
| + }
|
| +}
|
| +
|
| } // namespace
|
|
|