diff options
author | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 01:28:45 +0000 |
---|---|---|
committer | sammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-07 01:28:45 +0000 |
commit | b7ebe4de82381e106ec01490c6f60a4d6b5ae3ea (patch) | |
tree | 93d2f508a5704703a6975c0eddb67a0b287e2313 /apps/app_keep_alive_service_unittest.cc | |
parent | 6a6269c74a9262ee70aa402ddfd2449230355faf (diff) | |
download | chromium_src-b7ebe4de82381e106ec01490c6f60a4d6b5ae3ea.zip chromium_src-b7ebe4de82381e106ec01490c6f60a4d6b5ae3ea.tar.gz chromium_src-b7ebe4de82381e106ec01490c6f60a4d6b5ae3ea.tar.bz2 |
Don't add keep-alives for apps after the app keep-alive service has shut down.
BUG=314729
Review URL: https://codereview.chromium.org/60193005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233462 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps/app_keep_alive_service_unittest.cc')
-rw-r--r-- | apps/app_keep_alive_service_unittest.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/app_keep_alive_service_unittest.cc b/apps/app_keep_alive_service_unittest.cc index 3478162..9f08d76 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"); |