Chromium Code Reviews| Index: extensions/browser/image_loader_unittest.cc |
| diff --git a/extensions/browser/image_loader_unittest.cc b/extensions/browser/image_loader_unittest.cc |
| index 68b93b0f841640c63ffdfda73a6b7d9b1b90291e..9c0d8b9ce5d8c37abdfb8408a6940de1ada3c2ca 100644 |
| --- a/extensions/browser/image_loader_unittest.cc |
| +++ b/extensions/browser/image_loader_unittest.cc |
| @@ -12,8 +12,10 @@ |
| #include "chrome/browser/chrome_notification_types.h" |
|
Devlin
2014/06/25 19:59:54
nit: We should be able to remove this and notifica
limasdf
2014/07/20 06:35:50
Done. Handled in seperate CL :)
|
| #include "chrome/common/chrome_paths.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/component_extension_resource_manager.h" |
| +#include "extensions/browser/extension_registry.h" |
| #include "extensions/browser/extensions_browser_client.h" |
| #include "extensions/common/constants.h" |
| #include "extensions/common/extension.h" |
| @@ -186,12 +188,10 @@ 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( |
| - chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
| - content::NotificationService::AllSources(), |
| - content::Details<UnloadedExtensionInfo>(&details)); |
| + scoped_ptr<content::TestBrowserContext> browser_context( |
| + new content::TestBrowserContext()); |
| + extensions::ExtensionRegistry::Get(browser_context.get())->TriggerOnUnloaded( |
| + extension.get(), UnloadedExtensionInfo::REASON_UNINSTALL); |
| // Chuck the extension, that way if anyone tries to access it we should crash |
| // or get valgrind errors. |