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

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

Issue 2845513002: [WIP] Add Resource::IsShareable
Patch Set: fix Created 3 years, 7 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 | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
index 13638fc15d3dec5318932fa6d19a7db4b7227d27..35317fe09978c2e9fa776fb9266bb046e469ad38 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
@@ -148,8 +148,7 @@ TEST_F(ResourceFetcherTest, UseExistingResource) {
TEST_F(ResourceFetcherTest, Vary) {
KURL url(kParsedURLString, "http://127.0.0.1:8000/foo.html");
- Resource* resource =
- RawResource::Create(ResourceRequest(url), Resource::kRaw);
+ Resource* resource = MockResource::Create(ResourceRequest(url));
GetMemoryCache()->Add(resource);
ResourceResponse response;
response.SetURL(url);
@@ -167,7 +166,7 @@ TEST_F(ResourceFetcherTest, Vary) {
FetchParameters(resource_request, FetchInitiatorInfo());
Platform::Current()->GetURLLoaderMockFactory()->RegisterURL(
url, WebURLResponse(), "");
- Resource* new_resource = RawResource::Fetch(fetch_params, fetcher);
+ Resource* new_resource = MockResource::Fetch(fetch_params, fetcher);
EXPECT_NE(resource, new_resource);
new_resource->Loader()->Cancel();
}
@@ -215,8 +214,7 @@ TEST_F(ResourceFetcherTest, VaryOnBack) {
ResourceFetcher* fetcher = ResourceFetcher::Create(Context());
KURL url(kParsedURLString, "http://127.0.0.1:8000/foo.html");
- Resource* resource =
- RawResource::Create(ResourceRequest(url), Resource::kRaw);
+ Resource* resource = MockResource::Create(ResourceRequest(url));
GetMemoryCache()->Add(resource);
ResourceResponse response;
response.SetURL(url);
@@ -232,7 +230,7 @@ TEST_F(ResourceFetcherTest, VaryOnBack) {
resource_request.SetRequestContext(WebURLRequest::kRequestContextInternal);
FetchParameters fetch_params =
FetchParameters(resource_request, FetchInitiatorInfo());
- Resource* new_resource = RawResource::Fetch(fetch_params, fetcher);
+ Resource* new_resource = MockResource::Fetch(fetch_params, fetcher);
EXPECT_EQ(resource, new_resource);
}
@@ -700,9 +698,7 @@ TEST_F(ResourceFetcherTest, SpeculativePreloadShouldBePromotedToLinkePreload) {
TEST_F(ResourceFetcherTest, Revalidate304) {
KURL url(kParsedURLString, "http://127.0.0.1:8000/foo.html");
- Resource* resource =
- RawResource::Create(ResourceRequest(url), Resource::kRaw);
- GetMemoryCache()->Add(resource);
+ Resource* resource = MockResource::Create(ResourceRequest(url));
ResourceResponse response;
response.SetURL(url);
response.SetHTTPStatusCode(304);
@@ -717,7 +713,7 @@ TEST_F(ResourceFetcherTest, Revalidate304) {
FetchParameters(resource_request, FetchInitiatorInfo());
Platform::Current()->GetURLLoaderMockFactory()->RegisterURL(
url, WebURLResponse(), "");
- Resource* new_resource = RawResource::Fetch(fetch_params, fetcher);
+ Resource* new_resource = MockResource::Fetch(fetch_params, fetcher);
fetcher->StopFetching();
EXPECT_NE(resource, new_resource);
« no previous file with comments | « third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698