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

Unified Diff: third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp

Issue 2602793003: Do not reload in ImageResource::fetch() (Closed)
Patch Set: Rebase fix Created 3 years, 10 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/platform/loader/fetch/RawResourceTest.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp
index c47f74595f8dff54b2266302422d64e1850ada54..332df864ff7fec7dcc5792409927c928e7f416f2 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp
@@ -116,7 +116,8 @@ TEST_F(RawResourceTest, DontIgnoreAcceptForCacheReuse) {
ResourceRequest pngRequest;
pngRequest.setHTTPAccept("image/png");
- EXPECT_FALSE(jpegResource->canReuse(pngRequest));
+ EXPECT_FALSE(
+ jpegResource->canReuse(FetchRequest(pngRequest, FetchInitiatorInfo())));
}
class DummyClient final : public GarbageCollectedFinalized<DummyClient>,
@@ -576,14 +577,16 @@ TEST_F(RawResourceTest,
request.setHTTPHeaderField(
HTTPNames::X_DevTools_Emulate_Network_Conditions_Client_Id, "Foo");
Resource* raw = RawResource::create(request, Resource::Raw);
- EXPECT_TRUE(raw->canReuse(ResourceRequest("data:text/html,")));
+ EXPECT_TRUE(raw->canReuse(
+ FetchRequest(ResourceRequest("data:text/html,"), FetchInitiatorInfo())));
}
TEST_F(RawResourceTest, CanReuseDevToolsRequestIdHeader) {
ResourceRequest request("data:text/html,");
request.setHTTPHeaderField(HTTPNames::X_DevTools_Request_Id, "12345");
Resource* raw = RawResource::create(request, Resource::Raw);
- EXPECT_TRUE(raw->canReuse(ResourceRequest("data:text/html,")));
+ EXPECT_TRUE(raw->canReuse(
+ FetchRequest(ResourceRequest("data:text/html,"), FetchInitiatorInfo())));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698