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

Unified Diff: extensions/browser/image_loader_unittest.cc

Issue 977763002: Remove deprecated extension notification from ImageLoaderTest (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/image_loader_unittest.cc
diff --git a/extensions/browser/image_loader_unittest.cc b/extensions/browser/image_loader_unittest.cc
index d67ed98fcf1a6046638c44a8bf4a31010a68ee41..06763805be88b7c0aff0da2e5efb0083eb914142 100644
--- a/extensions/browser/image_loader_unittest.cc
+++ b/extensions/browser/image_loader_unittest.cc
@@ -10,9 +10,11 @@
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/test/test_browser_context.h"
#include "content/public/test/test_browser_thread.h"
+#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extensions_browser_client.h"
-#include "extensions/browser/notification_types.h"
+#include "extensions/browser/extensions_test.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -32,7 +34,7 @@ using content::NotificationService;
namespace extensions {
-class ImageLoaderTest : public testing::Test {
+class ImageLoaderTest : public ExtensionsTest {
public:
ImageLoaderTest()
: image_loaded_count_(0),
@@ -174,12 +176,8 @@ TEST_F(ImageLoaderTest, DeleteExtensionWhileWaitingForCache) {
EXPECT_EQ(0, image_loaded_count());
// Send out notification the extension was uninstalled.
- UnloadedExtensionInfo details(extension.get(),
- UnloadedExtensionInfo::REASON_UNINSTALL);
- content::NotificationService::current()->Notify(
- NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
- content::NotificationService::AllSources(),
- content::Details<UnloadedExtensionInfo>(&details));
+ ExtensionRegistry::Get(browser_context())->TriggerOnUnloaded(
+ extension.get(), UnloadedExtensionInfo::REASON_UNINSTALL);
// Chuck the extension, that way if anyone tries to access it we should crash
// or get valgrind errors.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698