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

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

Issue 2658603003: ServiceWorker: Enable UseCounter for ServiceWorkerGlobalScope (Closed)
Patch Set: int32_t -> uint32_t 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
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..51e0cb6f498363def003daa4791758cb696f1e0f 100644
--- a/content/browser/service_worker/service_worker_storage_unittest.cc
+++ b/content/browser/service_worker/service_worker_storage_unittest.cc
@@ -636,6 +636,7 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
const url::Origin kForeignFetchOrigin(GURL("https://example.com/"));
const base::Time kToday = base::Time::Now();
const base::Time kYesterday = kToday - base::TimeDelta::FromDays(1);
+ std::set<uint32_t> used_features = {124, 901, 1019};
scoped_refptr<ServiceWorkerRegistration> found_registration;
@@ -673,6 +674,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(used_features);
live_registration->SetWaitingVersion(live_version);
live_registration->set_last_update_check(kYesterday);
EXPECT_EQ(SERVICE_WORKER_OK,
@@ -686,6 +688,8 @@ TEST_F(ServiceWorkerStorageTest, StoreFindUpdateDeleteRegistration) {
live_registration->resources_total_size_bytes());
EXPECT_EQ(kResource1Size + kResource2Size,
found_registration->resources_total_size_bytes());
+ EXPECT_EQ(used_features,
+ found_registration->waiting_version()->used_features());
found_registration = NULL;
// But FindRegistrationForPattern is always async.
« no previous file with comments | « content/browser/service_worker/service_worker_storage.cc ('k') | content/browser/service_worker/service_worker_version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698