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

Unified Diff: Source/core/loader/FrameFetchContextTest.cpp

Issue 1035803002: Remove ResourceFetcher's access to a real FetchContext at frame detach time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved ASSERT(!m_importsController) to #if !ENABLE(OILPAN) block Created 5 years, 8 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
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameFetchContextTest.cpp
diff --git a/Source/core/loader/FrameFetchContextTest.cpp b/Source/core/loader/FrameFetchContextTest.cpp
index 1b40742be079f283ae2dc4427197b7e6762ee610..e2a91d5ec5cafb49383660097fb88b4c8e06790e 100644
--- a/Source/core/loader/FrameFetchContextTest.cpp
+++ b/Source/core/loader/FrameFetchContextTest.cpp
@@ -59,8 +59,8 @@ protected:
dummyPageHolder->page().setDeviceScaleFactor(1.0);
documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), ResourceRequest("http://www.example.com"), SubstituteData());
document = toHTMLDocument(&dummyPageHolder->document());
- fetchContext = &static_cast<FrameFetchContext&>(documentLoader->fetcher()->context());
- fetchContext->setDocument(document.get());
+ fetchContext = &documentLoader->fetcher()->context();
+ FrameFetchContext::provideDocumentToContext(*fetchContext, document.get());
}
void expectUpgrade(const char* input, const char* expected)
@@ -110,7 +110,7 @@ protected:
// as the ResourceFetcher and Document live due to indirect usage.
RefPtr<DocumentLoader> documentLoader;
RefPtrWillBePersistent<Document> document;
- FrameFetchContext* fetchContext;
+ FetchContext* fetchContext;
};
TEST_F(FrameFetchContextUpgradeTest, UpgradeInsecureResourceRequests)
@@ -211,8 +211,8 @@ protected:
dummyPageHolder->page().setDeviceScaleFactor(1.0);
documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), ResourceRequest("http://www.example.com"), SubstituteData());
document = toHTMLDocument(&dummyPageHolder->document());
- fetchContext = &static_cast<FrameFetchContext&>(documentLoader->fetcher()->context());
- fetchContext->setDocument(document.get());
+ fetchContext = &documentLoader->fetcher()->context();
+ FrameFetchContext::provideDocumentToContext(*fetchContext, document.get());
}
void expectHeader(const char* input, const char* headerName, bool isPresent, const char* headerValue)
@@ -230,7 +230,7 @@ protected:
// as the ResourceFetcher and Document live due to indirect usage.
RefPtr<DocumentLoader> documentLoader;
RefPtrWillBePersistent<Document> document;
- FrameFetchContext* fetchContext;
+ FetchContext* fetchContext;
};
TEST_F(FrameFetchContextHintsTest, MonitorDPRHints)
« no previous file with comments | « Source/core/loader/FrameFetchContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698