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

Unified Diff: content/browser/cache_storage/cache_storage_manager_unittest.cc

Issue 1113303003: CacheStorage: Support multiple batch operations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_responses
Patch Set: add comments Created 5 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 | « content/browser/cache_storage/cache_storage_dispatcher_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/cache_storage/cache_storage_manager_unittest.cc
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
index f0dfe4ad43cb0d237acd24659604421813771184..9f6843f227ab88cd6737385a1e54a0132cbd9af3 100644
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -190,14 +190,19 @@ class CacheStorageManagerTest : public testing::Test {
bool CachePut(const scoped_refptr<CacheStorageCache>& cache,
const GURL& url) {
- scoped_ptr<ServiceWorkerFetchRequest> request(
- new ServiceWorkerFetchRequest());
- scoped_ptr<ServiceWorkerResponse> response(new ServiceWorkerResponse());
- request->url = url;
- response->url = url;
+ ServiceWorkerFetchRequest request;
+ ServiceWorkerResponse response;
+ request.url = url;
+ response.url = url;
+
+ CacheStorageBatchOperation operation;
+ operation.operation_type = CACHE_STORAGE_CACHE_OPERATION_TYPE_PUT;
+ operation.request = request;
+ operation.response = response;
+
scoped_ptr<base::RunLoop> loop(new base::RunLoop());
- cache->Put(
- request.Pass(), response.Pass(),
+ cache->BatchOperation(
+ std::vector<CacheStorageBatchOperation>(1, operation),
base::Bind(&CacheStorageManagerTest::CachePutCallback,
base::Unretained(this), base::Unretained(loop.get())));
loop->Run();
« no previous file with comments | « content/browser/cache_storage/cache_storage_dispatcher_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698