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

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

Issue 2251633002: Use tri-state enum for the existence of Fetch Handler in ServiceWorkerVersion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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_controllee_request_handler_unittest.cc
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
index ef10ba48af85fbbca9a387baa525522c7f0ecf6f..66c5251d66e089581392cbdbd34dbc2e36a09764 100644
--- a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
+++ b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
@@ -171,8 +171,8 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, DisallowServiceWorker) {
SetBrowserClientForTesting(&test_browser_client);
// Store an activated worker.
- version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
version_->set_has_fetch_handler(true);
+ version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
registration_->SetActiveVersion(version_);
context()->storage()->StoreRegistration(
registration_.get(),
@@ -200,8 +200,8 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, DisallowServiceWorker) {
TEST_F(ServiceWorkerControlleeRequestHandlerTest, ActivateWaitingVersion) {
// Store a registration that is installed but not activated yet.
- version_->SetStatus(ServiceWorkerVersion::INSTALLED);
version_->set_has_fetch_handler(true);
+ version_->SetStatus(ServiceWorkerVersion::INSTALLED);
registration_->SetWaitingVersion(version_);
context()->storage()->StoreRegistration(
registration_.get(),
@@ -260,8 +260,8 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, InstallingRegistration) {
TEST_F(ServiceWorkerControlleeRequestHandlerTest, DeletedProviderHost) {
// Store a registration so the call to FindRegistrationForDocument will read
// from the database.
- version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
version_->set_has_fetch_handler(true);
+ version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
registration_->SetActiveVersion(version_);
context()->storage()->StoreRegistration(
registration_.get(),
@@ -290,8 +290,8 @@ TEST_F(ServiceWorkerControlleeRequestHandlerTest, DeletedProviderHost) {
}
TEST_F(ServiceWorkerControlleeRequestHandlerTest, FallbackWithNoFetchHandler) {
- version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
version_->set_has_fetch_handler(false);
+ version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
registration_->SetActiveVersion(version_);
context()->storage()->StoreRegistration(
registration_.get(), version_.get(),

Powered by Google App Engine
This is Rietveld 408576698