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

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

Issue 2751143003: Move FrameFetchContext::dispatchDidLoadResourceFromMemoryCache logic into ResourceFetcher (Closed)
Patch Set: addressed comments Created 3 years, 9 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/loader/FrameFetchContextTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
index f55e46de1bc8e156184cf291981cdfc8847e7ba9..f781ccc93baa34eefb4efe4729618c21b92247d3 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -720,6 +720,7 @@ TEST_F(FrameFetchContextTest, DisabledDataSaver) {
TEST_F(FrameFetchContextMockedLocalFrameClientTest,
DispatchDidLoadResourceFromMemoryCache) {
ResourceRequest resourceRequest(url);
+ resourceRequest.setRequestContext(WebURLRequest::RequestContextImage);
Resource* resource = MockResource::create(resourceRequest);
EXPECT_CALL(
*client,
@@ -731,8 +732,7 @@ TEST_F(FrameFetchContextMockedLocalFrameClientTest,
WebURLRequest::RequestContextImage)),
ResourceResponse()));
fetchContext->dispatchDidLoadResourceFromMemoryCache(
- createUniqueIdentifier(), resource, WebURLRequest::FrameTypeNone,
- WebURLRequest::RequestContextImage);
+ createUniqueIdentifier(), resourceRequest, resource->response());
}
// Tests that when a resource with certificate errors is loaded from the memory
@@ -740,6 +740,7 @@ TEST_F(FrameFetchContextMockedLocalFrameClientTest,
TEST_F(FrameFetchContextMockedLocalFrameClientTest,
MemoryCacheCertificateError) {
ResourceRequest resourceRequest(url);
+ resourceRequest.setRequestContext(WebURLRequest::RequestContextImage);
ResourceResponse response;
response.setURL(url);
response.setHasMajorCertificateErrors(true);
@@ -747,8 +748,7 @@ TEST_F(FrameFetchContextMockedLocalFrameClientTest,
resource->setResponse(response);
EXPECT_CALL(*client, didDisplayContentWithCertificateErrors(url));
fetchContext->dispatchDidLoadResourceFromMemoryCache(
- createUniqueIdentifier(), resource, WebURLRequest::FrameTypeNone,
- WebURLRequest::RequestContextImage);
+ createUniqueIdentifier(), resourceRequest, resource->response());
}
TEST_F(FrameFetchContextTest, SetIsExternalRequestForPublicDocument) {

Powered by Google App Engine
This is Rietveld 408576698