diff options
Diffstat (limited to 'chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc b/chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc index 961cfad7598..394a65d1f91 100644 --- a/chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc +++ b/chromium/third_party/blink/renderer/core/css/parser/css_lazy_parsing_test.cc @@ -45,9 +45,7 @@ TEST_F(CSSLazyParsingTest, Simple) { EXPECT_TRUE(HasParsedProperties(rule)); } -// Avoid parsing rules with ::before or ::after to avoid causing -// collectFeatures() when we trigger parsing for attr(); -TEST_F(CSSLazyParsingTest, DontLazyParseBeforeAfter) { +TEST_F(CSSLazyParsingTest, LazyParseBeforeAfter) { CSSParserContext* context = CSSParserContext::Create( kHTMLStandardMode, SecureContextMode::kInsecureContext); StyleSheetContents* style_sheet = StyleSheetContents::Create(context); @@ -57,8 +55,8 @@ TEST_F(CSSLazyParsingTest, DontLazyParseBeforeAfter) { CSSParser::ParseSheet(context, style_sheet, sheet_text, CSSDeferPropertyParsing::kYes); - EXPECT_TRUE(HasParsedProperties(RuleAt(style_sheet, 0))); - EXPECT_TRUE(HasParsedProperties(RuleAt(style_sheet, 1))); + EXPECT_FALSE(HasParsedProperties(RuleAt(style_sheet, 0))); + EXPECT_FALSE(HasParsedProperties(RuleAt(style_sheet, 1))); } // Test for crbug.com/664115 where |shouldConsiderForMatchingRules| would flip @@ -88,8 +86,8 @@ TEST_F(CSSLazyParsingTest, ShouldConsiderForMatchingRulesDoesntChange1) { rule->ShouldConsiderForMatchingRules(false /* includeEmptyRules */)); } -// Test the same thing as above, with a property that does not get lazy parsed, -// to ensure that we perform the optimization where possible. +// Test the same thing as above with lazy parsing off to ensure that we perform +// the optimization where possible. TEST_F(CSSLazyParsingTest, ShouldConsiderForMatchingRulesSimple) { CSSParserContext* context = CSSParserContext::Create( kHTMLStandardMode, SecureContextMode::kInsecureContext); @@ -97,7 +95,7 @@ TEST_F(CSSLazyParsingTest, ShouldConsiderForMatchingRulesSimple) { String sheet_text = "p::before { ,badness, } "; CSSParser::ParseSheet(context, style_sheet, sheet_text, - CSSDeferPropertyParsing::kYes); + CSSDeferPropertyParsing::kNo); StyleRule* rule = RuleAt(style_sheet, 0); EXPECT_TRUE(HasParsedProperties(rule)); |