Index: chrome/browser/ui/panels/panel_browsertest.cc |
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc |
index 52c4d3038813f980d8bb620657c0fab1417fab91..600461ad885341a71e5dd938721c295f3390e299 100644 |
--- a/chrome/browser/ui/panels/panel_browsertest.cc |
+++ b/chrome/browser/ui/panels/panel_browsertest.cc |
@@ -37,6 +37,7 @@ |
#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
#include "content/test/net/url_request_mock_http_job.h" |
+#include "extensions/browser/extension_registry.h" |
#include "extensions/common/constants.h" |
#include "net/base/net_util.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -1418,12 +1419,12 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, |
content::Source<Panel>(panel1)); |
// Send unload notification on the first extension. |
- extensions::UnloadedExtensionInfo details( |
- extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); |
- content::NotificationService::current()->Notify( |
- chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, |
- content::Source<Profile>(browser()->profile()), |
- content::Details<extensions::UnloadedExtensionInfo>(&details)); |
+ extensions::ExtensionRegistry* registry = |
+ extensions::ExtensionRegistry::Get(browser()->profile()); |
+ registry->RemoveEnabled(extension->id()); |
+ registry->TriggerOnUnloaded( |
+ extension.get(), |
+ extensions::UnloadedExtensionInfo::REASON_UNINSTALL); |
// Wait for the panels opened by the first extension to close. |
signal.Wait(); |