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

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

Issue 1063913002: Revert of Remove ResourceFetcher's access to a real FetchContext at frame detach time (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 e2a91d5ec5cafb49383660097fb88b4c8e06790e..1b40742be079f283ae2dc4427197b7e6762ee610 100644
--- a/Source/core/loader/FrameFetchContextTest.cpp
+++ b/Source/core/loader/FrameFetchContextTest.cpp
@@ -59,8 +59,8 @@
dummyPageHolder->page().setDeviceScaleFactor(1.0);
documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), ResourceRequest("http://www.example.com"), SubstituteData());
document = toHTMLDocument(&dummyPageHolder->document());
- fetchContext = &documentLoader->fetcher()->context();
- FrameFetchContext::provideDocumentToContext(*fetchContext, document.get());
+ fetchContext = &static_cast<FrameFetchContext&>(documentLoader->fetcher()->context());
+ fetchContext->setDocument(document.get());
}
void expectUpgrade(const char* input, const char* expected)
@@ -110,7 +110,7 @@
// as the ResourceFetcher and Document live due to indirect usage.
RefPtr<DocumentLoader> documentLoader;
RefPtrWillBePersistent<Document> document;
- FetchContext* fetchContext;
+ FrameFetchContext* fetchContext;
};
TEST_F(FrameFetchContextUpgradeTest, UpgradeInsecureResourceRequests)
@@ -211,8 +211,8 @@
dummyPageHolder->page().setDeviceScaleFactor(1.0);
documentLoader = DocumentLoader::create(&dummyPageHolder->frame(), ResourceRequest("http://www.example.com"), SubstituteData());
document = toHTMLDocument(&dummyPageHolder->document());
- fetchContext = &documentLoader->fetcher()->context();
- FrameFetchContext::provideDocumentToContext(*fetchContext, document.get());
+ fetchContext = &static_cast<FrameFetchContext&>(documentLoader->fetcher()->context());
+ fetchContext->setDocument(document.get());
}
void expectHeader(const char* input, const char* headerName, bool isPresent, const char* headerValue)
@@ -230,7 +230,7 @@
// as the ResourceFetcher and Document live due to indirect usage.
RefPtr<DocumentLoader> documentLoader;
RefPtrWillBePersistent<Document> document;
- FetchContext* fetchContext;
+ FrameFetchContext* 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