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

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

Issue 805083006: Schedule the stop-worker-timer even if the ServiceWorker is controlling pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/service_worker/service_worker_version_unittest.cc
diff --git a/content/browser/service_worker/service_worker_version_unittest.cc b/content/browser/service_worker/service_worker_version_unittest.cc
index f6d4629d39d2bf4871066193c037fbc169b3599c..a479f68b91a813967019ff3f35c991b8fe86607e 100644
--- a/content/browser/service_worker/service_worker_version_unittest.cc
+++ b/content/browser/service_worker/service_worker_version_unittest.cc
@@ -381,7 +381,7 @@ TEST_F(ServiceWorkerVersionTest, ScheduleStopWorker) {
EXPECT_EQ(SERVICE_WORKER_OK, status);
EXPECT_TRUE(version_->stop_worker_timer_.IsRunning());
- // The timer should not be running if a controllee is added.
+ // Adding controllee doesn't stop the stop-worker-timer.
scoped_ptr<ServiceWorkerProviderHost> host(
new ServiceWorkerProviderHost(33 /* dummy render process id */,
MSG_ROUTING_NONE /* render_frame_id */,
@@ -389,10 +389,6 @@ TEST_F(ServiceWorkerVersionTest, ScheduleStopWorker) {
helper_->context()->AsWeakPtr(),
NULL));
version_->AddControllee(host.get());
- EXPECT_FALSE(version_->stop_worker_timer_.IsRunning());
-
- // The timer should be running if the controllee is removed.
- version_->RemoveControllee(host.get());
EXPECT_TRUE(version_->stop_worker_timer_.IsRunning());
}
« no previous file with comments | « content/browser/service_worker/service_worker_version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698