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

Unified Diff: content/browser/service_worker/service_worker_storage_unittest.cc

Issue 1393783002: ServiceWorker: Schedule DeleteAndStartOver when failing to store resource ids (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify the patch Created 5 years, 2 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: content/browser/service_worker/service_worker_storage_unittest.cc
diff --git a/content/browser/service_worker/service_worker_storage_unittest.cc b/content/browser/service_worker/service_worker_storage_unittest.cc
index 9eb8af1cdd67490972b8301291f1104865422e63..23399c252f9e63f92edae32e383e2561e0ccaf5e 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -911,8 +911,8 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest {
registration_->waiting_version()->SetStatus(ServiceWorkerVersion::NEW);
// Add the resources ids to the uncommitted list.
- storage()->StoreUncommittedResponseId(resource_id1_);
- storage()->StoreUncommittedResponseId(resource_id2_);
+ storage()->StoreUncommittedResourceId(resource_id1_);
+ storage()->StoreUncommittedResourceId(resource_id2_);
base::RunLoop().RunUntilIdle();
std::set<int64> verify_ids;
EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
@@ -1189,7 +1189,7 @@ TEST_F(ServiceWorkerResourceStorageDiskTest, CleanupOnRestart) {
// Also add an uncommitted resource.
int64 kStaleUncommittedResourceId = storage()->NewResourceId();
- storage()->StoreUncommittedResponseId(kStaleUncommittedResourceId);
+ storage()->StoreUncommittedResourceId(kStaleUncommittedResourceId);
base::RunLoop().RunUntilIdle();
verify_ids.clear();
EXPECT_EQ(ServiceWorkerDatabase::STATUS_OK,
@@ -1219,7 +1219,7 @@ TEST_F(ServiceWorkerResourceStorageDiskTest, CleanupOnRestart) {
// Store a new uncommitted resource. This triggers stale resource cleanup.
int64 kNewResourceId = storage()->NewResourceId();
WriteBasicResponse(storage(), kNewResourceId);
- storage()->StoreUncommittedResponseId(kNewResourceId);
+ storage()->StoreUncommittedResourceId(kNewResourceId);
base::RunLoop().RunUntilIdle();
// The stale resources should be purged, but the new resource should persist.

Powered by Google App Engine
This is Rietveld 408576698