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

Unified Diff: apps/app_keep_alive_service_unittest.cc

Issue 60193005: Don't add keep-alives for apps after the app keep-alive service has shut down. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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 | « apps/app_keep_alive_service.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_keep_alive_service_unittest.cc
diff --git a/apps/app_keep_alive_service_unittest.cc b/apps/app_keep_alive_service_unittest.cc
index 3478162e8b577b183509bb5cf7ea723d6eedca57..9f08d76ef3983210181ed67edd801230cf9b0afa 100644
--- a/apps/app_keep_alive_service_unittest.cc
+++ b/apps/app_keep_alive_service_unittest.cc
@@ -78,6 +78,14 @@ TEST_F(AppKeepAliveServiceUnitTest, StartMoreThanOnce) {
EXPECT_FALSE(chrome::WillKeepAlive());
}
+// Test that OnAppStart is ignored after the service has been shut down.
+TEST_F(AppKeepAliveServiceUnitTest, StartAfterShutdown) {
+ ASSERT_FALSE(chrome::WillKeepAlive());
+ service_->Shutdown();
+ service_->OnAppStart(&profile_, "foo");
+ EXPECT_FALSE(chrome::WillKeepAlive());
+}
+
TEST_F(AppKeepAliveServiceUnitTest, MultipleApps) {
ASSERT_FALSE(chrome::WillKeepAlive());
service_->OnAppStart(&profile_, "foo");
« no previous file with comments | « apps/app_keep_alive_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698