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

Unified Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 262223003: Use ExtensionRegistryObserver instead of DEPRECATED extension notify. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test 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 | « chrome/browser/ui/panels/panel.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « chrome/browser/ui/panels/panel.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698