Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp

Issue 2616093003: Make CSSParserContext be garbage collected. (Closed)
Patch Set: fix fuzzer compile Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp b/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
index 232850d3fb2b92da7f50baf2cb865ca3fc7a259c..8225b770b358d1590e176fe7eb1a9e9b04da0c63 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContentsTest.cpp
@@ -11,7 +11,7 @@
namespace blink {
TEST(StyleSheetContentsTest, InsertMediaRule) {
- CSSParserContext context(HTMLStandardMode, nullptr);
+ CSSParserContext* context = new CSSParserContext(HTMLStandardMode);
StyleSheetContents* styleSheet = StyleSheetContents::create(context);
styleSheet->parseString("@namespace ns url(test);");
@@ -34,7 +34,7 @@ TEST(StyleSheetContentsTest, InsertMediaRule) {
}
TEST(StyleSheetContentsTest, InsertFontFaceRule) {
- CSSParserContext context(HTMLStandardMode, nullptr);
+ CSSParserContext* context = new CSSParserContext(HTMLStandardMode);
StyleSheetContents* styleSheet = StyleSheetContents::create(context);
styleSheet->parseString("@namespace ns url(test);");
@@ -57,7 +57,7 @@ TEST(StyleSheetContentsTest, InsertFontFaceRule) {
}
TEST(StyleSheetContentsTest, HasViewportRule) {
- CSSParserContext context(HTMLStandardMode, nullptr);
+ CSSParserContext* context = new CSSParserContext(HTMLStandardMode);
StyleSheetContents* styleSheet = StyleSheetContents::create(context);
styleSheet->parseString("@viewport { width: 200px}");
@@ -66,7 +66,7 @@ TEST(StyleSheetContentsTest, HasViewportRule) {
}
TEST(StyleSheetContentsTest, HasViewportRuleAfterInsertion) {
- CSSParserContext context(HTMLStandardMode, nullptr);
+ CSSParserContext* context = new CSSParserContext(HTMLStandardMode);
StyleSheetContents* styleSheet = StyleSheetContents::create(context);
styleSheet->parseString("body { color: pink }");
@@ -82,7 +82,7 @@ TEST(StyleSheetContentsTest, HasViewportRuleAfterInsertion) {
}
TEST(StyleSheetContentsTest, HasViewportRuleAfterInsertionIntoMediaRule) {
- CSSParserContext context(HTMLStandardMode, nullptr);
+ CSSParserContext* context = new CSSParserContext(HTMLStandardMode);
StyleSheetContents* styleSheet = StyleSheetContents::create(context);
styleSheet->parseString("@media {}");

Powered by Google App Engine