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

Unified Diff: third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp

Issue 2714383003: Reduce FetchContext::getCachePolicy() callers (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp b/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
index e5c0fa74fe007b0c3686b352c82d0fa242431262..c7dc7a2e831faf34e0c7001e49cf34c4787bcdf2 100644
--- a/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
@@ -18,6 +18,7 @@
#include "platform/network/ResourceResponse.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebCachePolicy.h"
#include "public/platform/WebURLLoaderMockFactory.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -59,10 +60,10 @@ TEST_F(FontResourceTest,
// Set the context as it is on reloads.
context->setLoadComplete(true);
- context->setCachePolicy(CachePolicyRevalidate);
// Revalidate the resource.
ResourceRequest request2(url);
+ request2.setCachePolicy(WebCachePolicy::ValidatingCacheData);
FetchRequest fetchRequest2 = FetchRequest(request2, FetchInitiatorInfo());
Resource* resource2 = FontResource::fetch(fetchRequest2, fetcher);
ASSERT_TRUE(resource2);
@@ -72,6 +73,7 @@ TEST_F(FontResourceTest,
// Fetch the same resource again before actual load operation starts.
ResourceRequest request3(url);
+ request3.setCachePolicy(WebCachePolicy::ValidatingCacheData);
FetchRequest fetchRequest3 = FetchRequest(request3, FetchInitiatorInfo());
Resource* resource3 = FontResource::fetch(fetchRequest3, fetcher);
ASSERT_TRUE(resource3);
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698