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

Unified Diff: extensions/browser/image_loader_unittest.cc

Issue 406093004: Revert of Add ExtensionsTestBrowserContext class for test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 | « extensions/browser/extensions_test_browser_context.cc ('k') | extensions/extensions.gyp » ('j') | 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 73d173dc4ef23732d27c24ac00c3688e335e07ba..68b93b0f841640c63ffdfda73a6b7d9b1b90291e 100644
--- a/extensions/browser/image_loader_unittest.cc
+++ b/extensions/browser/image_loader_unittest.cc
@@ -9,12 +9,12 @@
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
+#include "chrome/browser/chrome_notification_types.h"
#include "chrome/common/chrome_paths.h"
+#include "content/public/browser/notification_service.h"
#include "content/public/test/test_browser_thread.h"
#include "extensions/browser/component_extension_resource_manager.h"
-#include "extensions/browser/extension_registry.h"
#include "extensions/browser/extensions_browser_client.h"
-#include "extensions/browser/extensions_test_browser_context.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
@@ -185,10 +185,13 @@
// The image isn't cached, so we should not have received notification.
EXPECT_EQ(0, image_loaded_count());
- extensions::ExtensionsTestBrowserContext browser_context;
// Send out notification the extension was uninstalled.
- extensions::ExtensionRegistry::Get(&browser_context)->TriggerOnUnloaded(
- extension.get(), UnloadedExtensionInfo::REASON_UNINSTALL);
+ UnloadedExtensionInfo details(extension.get(),
+ UnloadedExtensionInfo::REASON_UNINSTALL);
+ content::NotificationService::current()->Notify(
+ chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
+ content::NotificationService::AllSources(),
+ content::Details<UnloadedExtensionInfo>(&details));
// Chuck the extension, that way if anyone tries to access it we should crash
// or get valgrind errors.
« no previous file with comments | « extensions/browser/extensions_test_browser_context.cc ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698