Chromium Code Reviews| 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 9598586c9d45b0b5ca2f51dd3ee6956dfcba0b3a..b3e065a581cf25b0998ddcb939834240f4112f2e 100644 |
| --- a/content/browser/service_worker/service_worker_storage_unittest.cc |
| +++ b/content/browser/service_worker/service_worker_storage_unittest.cc |
| @@ -673,6 +673,7 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) { |
| std::vector<GURL>(1, kForeignFetchScope)); |
| live_version->set_foreign_fetch_origins( |
| std::vector<url::Origin>(1, kForeignFetchOrigin)); |
| + live_version->set_used_features({124, 901, 1019}); |
| live_registration->SetWaitingVersion(live_version); |
| live_registration->set_last_update_check(kYesterday); |
| EXPECT_EQ(SERVICE_WORKER_OK, |
| @@ -1146,6 +1147,7 @@ class ServiceWorkerResourceStorageTest : public ServiceWorkerStorageTest { |
| data.script = script_; |
| data.version_id = version_id_; |
| data.is_active = false; |
| + data.used_features = {109, 421, 9101}; |
| std::vector<ResourceRecord> resources; |
| resources.push_back( |
| ResourceRecord(resource_id1_, script_, resource_id1_size_)); |
| @@ -1577,6 +1579,7 @@ TEST_F(ServiceWorkerResourceStorageTest, UpdateRegistration) { |
| live_version->script_cache_map()->SetResources(records); |
| live_version->set_fetch_handler_existence( |
| ServiceWorkerVersion::FetchHandlerExistence::EXISTS); |
| + live_version->set_used_features({124, 901, 1019}); |
|
falken
2017/02/08 05:01:53
Just curious why we set the used features here. Sh
nhiroki
2017/02/09 05:11:31
Yeah, this doesn't really make sense. I meant to c
|
| // Writing the registration should move the old version's resources to the |
| // purgeable list but keep them available. |
| @@ -1600,6 +1603,11 @@ TEST_F(ServiceWorkerResourceStorageTest, UpdateRegistration) { |
| EXPECT_TRUE(VerifyBasicResponse(storage(), resource_id1_, false)); |
| EXPECT_TRUE(VerifyBasicResponse(storage(), resource_id2_, false)); |
| + scoped_refptr<ServiceWorkerRegistration> found_registration; |
| + EXPECT_EQ(SERVICE_WORKER_OK, |
| + FindRegistrationForDocument(document_url_, &found_registration)); |
| + EXPECT_EQ(registration_, found_registration); |
| + |
| // Removing the controllee should cause the old version's resources to be |
| // deleted. |
| registration_->active_version()->RemoveControllee(host.get()); |