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

Unified Diff: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc

Issue 913943002: Unregister from GCM when the only GCM app is removed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « chrome/browser/extensions/extension_gcm_app_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
diff --git a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
index c76a0c9b82f966a7657478c76a01431362be8a82..1fc01f303c26aa8eb1a22658d173b0ca6b05d804 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -148,6 +148,7 @@ class FakeExtensionGCMAppHandler : public ExtensionGCMAppHandler {
void OnUnregisterCompleted(const std::string& app_id,
gcm::GCMClient::Result result) override {
+ ExtensionGCMAppHandler::OnUnregisterCompleted(app_id,result);
fgorski 2015/02/10 23:10:01 nit: space after a comma. (run git cl format)
unregistration_result_ = result;
waiter_->SignalCompleted();
}
@@ -417,19 +418,11 @@ TEST_F(ExtensionGCMAppHandlerTest, UnregisterOnExtensionUninstall) {
waiter()->WaitUntilCompleted();
EXPECT_EQ(gcm::GCMClient::SUCCESS, registration_result());
- // Add another app handler in order to prevent the GCM service from being
- // stopped when the extension is uninstalled. This is needed because otherwise
- // we are not able to receive the unregistration result.
- GetGCMDriver()->AddAppHandler("Foo", gcm_app_handler());
-
// Unregistration should be triggered when the extension is uninstalled.
UninstallExtension(extension.get());
waiter()->WaitUntilCompleted();
EXPECT_EQ(gcm::GCMClient::SUCCESS,
gcm_app_handler()->unregistration_result());
-
- // Clean up.
- GetGCMDriver()->RemoveAppHandler("Foo");
}
TEST_F(ExtensionGCMAppHandlerTest, UpdateExtensionWithGcmPermissionKept) {
« no previous file with comments | « chrome/browser/extensions/extension_gcm_app_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698