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

Unified Diff: third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.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/css/CSSStyleSheetResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp b/third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp
index 7ed97067ad898ba4303a1478ddf341301d04df9a..b978d473a7f29c5f4558e4cb9688237b37233f57 100644
--- a/third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp
+++ b/third_party/WebKit/Source/core/css/CSSStyleSheetResourceTest.cpp
@@ -48,7 +48,7 @@ protected:
{
m_originalMemoryCache = replaceMemoryCacheForTesting(MemoryCache::create());
m_page = DummyPageHolder::create();
- document()->setURL(KURL(KURL(), "https://localhost/"));
+ document().setURL(KURL(KURL(), "https://localhost/"));
}
~CSSStyleSheetResourceTest() override
@@ -56,7 +56,7 @@ protected:
replaceMemoryCacheForTesting(m_originalMemoryCache.release());
}
- Document* document() { return &m_page->document(); }
+ Document& document() { return m_page->document(); }
Persistent<MemoryCache> m_originalMemoryCache;
std::unique_ptr<DummyPageHolder> m_page;
@@ -71,7 +71,7 @@ TEST_F(CSSStyleSheetResourceTest, PruneCanCauseEviction)
// We need to disable loading because we manually give a response to
// the image resource.
- document()->fetcher()->setAutoLoadImages(false);
+ document().fetcher()->setAutoLoadImages(false);
CSSStyleSheetResource* cssResource = CSSStyleSheetResource::createForTest(ResourceRequest(cssURL), "utf-8");
memoryCache()->add(cssResource);
@@ -93,7 +93,8 @@ TEST_F(CSSStyleSheetResourceTest, PruneCanCauseEviction)
contents->parserAppendRule(
StyleRule::create(CSSSelectorList::adoptSelectorVector(selectors), ImmutableStylePropertySet::create(&property, 1, HTMLStandardMode)));
- crossfade->loadSubimages(document());
+ // TODO(rune@opera.com): loadSubimages should take Document&.
+ crossfade->loadSubimages(&document());
Resource* imageResource = memoryCache()->resourceForURL(imageURL, MemoryCache::defaultCacheIdentifier());
ASSERT_TRUE(imageResource);
ResourceResponse imageResponse;
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSStyleSheet.cpp ('k') | third_party/WebKit/Source/core/css/CSSTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698