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

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

Issue 360123002: ServiceWorker: some more groundwork in support of the update process (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 417a0b7f237f2cb4ba7cc3dfc4273a272f6e1022..acc37750876e713463b820f164012841234b21e5 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -305,7 +305,7 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
new ServiceWorkerVersion(
live_registration, kVersionId, context_ptr_);
live_version->SetStatus(ServiceWorkerVersion::INSTALLED);
- live_registration->set_waiting_version(live_version);
+ live_registration->SetWaitingVersion(live_version);
EXPECT_EQ(SERVICE_WORKER_OK,
StoreRegistration(live_registration, live_version));
@@ -359,9 +359,8 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
// Update to active.
scoped_refptr<ServiceWorkerVersion> temp_version =
found_registration->waiting_version();
- found_registration->set_waiting_version(NULL);
temp_version->SetStatus(ServiceWorkerVersion::ACTIVE);
- found_registration->set_active_version(temp_version);
+ found_registration->SetActiveVersion(temp_version);
temp_version = NULL;
EXPECT_EQ(SERVICE_WORKER_OK, UpdateToActiveState(found_registration));
found_registration = NULL;
@@ -419,7 +418,7 @@ TEST_F(ServiceWorkerStorageTest, InstallingRegistrationsAreFindable) {
new ServiceWorkerVersion(
live_registration, kVersionId, context_ptr_);
live_version->SetStatus(ServiceWorkerVersion::INSTALLING);
- live_registration->set_waiting_version(live_version);
+ live_registration->SetWaitingVersion(live_version);
// Should not be findable, including by GetAllRegistrations.
EXPECT_EQ(SERVICE_WORKER_ERROR_NOT_FOUND,
@@ -573,7 +572,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
new ServiceWorkerVersion(
live_registration1, kVersionId1, context_ptr_);
live_version1->SetStatus(ServiceWorkerVersion::INSTALLED);
- live_registration1->set_waiting_version(live_version1);
+ live_registration1->SetWaitingVersion(live_version1);
// Registration for "/scope/foo*".
const GURL kScope2("http://www.example.com/scope/foo*");
@@ -587,7 +586,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
new ServiceWorkerVersion(
live_registration2, kVersionId2, context_ptr_);
live_version2->SetStatus(ServiceWorkerVersion::INSTALLED);
- live_registration2->set_waiting_version(live_version2);
+ live_registration2->SetWaitingVersion(live_version2);
// Registration for "/scope/foo".
const GURL kScope3("http://www.example.com/scope/foo");
@@ -601,7 +600,7 @@ TEST_F(ServiceWorkerStorageTest, FindRegistration_LongestScopeMatch) {
new ServiceWorkerVersion(
live_registration3, kVersionId3, context_ptr_);
live_version3->SetStatus(ServiceWorkerVersion::INSTALLED);
- live_registration3->set_waiting_version(live_version3);
+ live_registration3->SetWaitingVersion(live_version3);
// Notify storage of they being installed.
storage()->NotifyInstallingRegistration(live_registration1);

Powered by Google App Engine
This is Rietveld 408576698