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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngineTest.cpp

Issue 2354773003: Make stylesheet owner node a reference instead of pointer. (Closed)
Patch Set: const Created 4 years, 3 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
Index: third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
index f40e71e9c02545d88505e3122a8c3dc8e1c6da10..08f1d337939d845b44d465309f1f1d39bd5194c4 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngineTest.cpp
@@ -77,12 +77,12 @@ TEST_F(StyleEngineTest, TextToSheetCache)
TextPosition minPos = TextPosition::minimumPosition();
StyleEngineContext context;
- CSSStyleSheet* sheet1 = styleEngine().createSheet(element, sheetText, minPos, context);
+ CSSStyleSheet* sheet1 = styleEngine().createSheet(*element, sheetText, minPos, context);
// Check that the first sheet is not using a cached StyleSheetContents.
EXPECT_FALSE(sheet1->contents()->isUsedFromTextCache());
- CSSStyleSheet* sheet2 = styleEngine().createSheet(element, sheetText, minPos, context);
+ CSSStyleSheet* sheet2 = styleEngine().createSheet(*element, sheetText, minPos, context);
// Check that the second sheet uses the cached StyleSheetContents for the first.
EXPECT_EQ(sheet1->contents(), sheet2->contents());
@@ -96,7 +96,7 @@ TEST_F(StyleEngineTest, TextToSheetCache)
ThreadState::current()-> collectAllGarbage();
element = HTMLStyleElement::create(document(), false);
- sheet1 = styleEngine().createSheet(element, sheetText, minPos, context);
+ sheet1 = styleEngine().createSheet(*element, sheetText, minPos, context);
// Check that we did not use a cached StyleSheetContents after the garbage collection.
EXPECT_FALSE(sheet1->contents()->isUsedFromTextCache());
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | third_party/WebKit/Source/core/dom/TreeScopeStyleSheetCollection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698