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

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

Issue 508513002: Remove implicit conversions from scoped_refptr to T* in chrome/browser/extensions/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Two more Created 6 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: 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 21027f3a65a4f24a8123d690448f8773720b8d3a..5aef203f2754fecdece31c21b57b771d8280f55a 100644
--- a/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
+++ b/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc
@@ -411,29 +411,29 @@ TEST_F(ExtensionGCMAppHandlerTest, AddAndRemoveAppHandler) {
scoped_refptr<Extension> extension(CreateExtension());
// App handler is added when extension is loaded.
- LoadExtension(extension);
+ LoadExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_TRUE(HasAppHandlers(extension->id()));
// App handler is removed when extension is unloaded.
- DisableExtension(extension);
+ DisableExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_FALSE(HasAppHandlers(extension->id()));
// App handler is added when extension is reloaded.
- EnableExtension(extension);
+ EnableExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_TRUE(HasAppHandlers(extension->id()));
// App handler is removed when extension is uninstalled.
- UninstallExtension(extension);
+ UninstallExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_FALSE(HasAppHandlers(extension->id()));
}
TEST_F(ExtensionGCMAppHandlerTest, UnregisterOnExtensionUninstall) {
scoped_refptr<Extension> extension(CreateExtension());
- LoadExtension(extension);
+ LoadExtension(extension.get());
// Sign-in is needed for registration.
SignIn(kTestingUsername);
@@ -451,7 +451,7 @@ TEST_F(ExtensionGCMAppHandlerTest, UnregisterOnExtensionUninstall) {
GetGCMDriver()->AddAppHandler("Foo", gcm_app_handler());
// Unregistration should be triggered when the extension is uninstalled.
- UninstallExtension(extension);
+ UninstallExtension(extension.get());
waiter()->WaitUntilCompleted();
EXPECT_EQ(gcm::GCMClient::SUCCESS,
gcm_app_handler()->unregistration_result());
@@ -464,12 +464,12 @@ TEST_F(ExtensionGCMAppHandlerTest, UpdateExtensionWithGcmPermissionKept) {
scoped_refptr<Extension> extension(CreateExtension());
// App handler is added when the extension is loaded.
- LoadExtension(extension);
+ LoadExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_TRUE(HasAppHandlers(extension->id()));
// App handler count should not drop to zero when the extension is updated.
- UpdateExtension(extension, "gcm2.crx");
+ UpdateExtension(extension.get(), "gcm2.crx");
waiter()->PumpUILoop();
EXPECT_FALSE(gcm_app_handler()->app_handler_count_drop_to_zero());
EXPECT_TRUE(HasAppHandlers(extension->id()));
@@ -479,13 +479,13 @@ TEST_F(ExtensionGCMAppHandlerTest, UpdateExtensionWithGcmPermissionRemoved) {
scoped_refptr<Extension> extension(CreateExtension());
// App handler is added when the extension is loaded.
- LoadExtension(extension);
+ LoadExtension(extension.get());
waiter()->PumpUILoop();
EXPECT_TRUE(HasAppHandlers(extension->id()));
// App handler is removed when the extension is updated to the version that
// has GCM permission removed.
- UpdateExtension(extension, "good2.crx");
+ UpdateExtension(extension.get(), "good2.crx");
waiter()->PumpUILoop();
EXPECT_TRUE(gcm_app_handler()->app_handler_count_drop_to_zero());
EXPECT_FALSE(HasAppHandlers(extension->id()));

Powered by Google App Engine
This is Rietveld 408576698