summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browsertest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_browsertest.cc')
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 1d3b5a9..0fca208 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -116,15 +116,10 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(
}
void ExtensionBrowserTest::ReloadExtension(const std::string& extension_id) {
- NotificationRegistrar registrar;
- registrar.Add(this, NotificationType::EXTENSION_LOADED,
- NotificationService::AllSources());
-
ExtensionsService* service = browser()->profile()->GetExtensionsService();
service->ReloadExtension(extension_id);
- MessageLoop::current()->PostDelayedTask(
- FROM_HERE, new MessageLoop::QuitTask, kTimeoutMs);
- ui_test_utils::RunMessageLoop();
+ ui_test_utils::RegisterAndWait(NotificationType::EXTENSION_PROCESS_CREATED,
+ this, kTimeoutMs);
}
void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) {
@@ -259,6 +254,11 @@ void ExtensionBrowserTest::Observe(NotificationType type,
MessageLoopForUI::current()->Quit();
break;
+ case NotificationType::EXTENSION_PROCESS_CREATED:
+ std::cout << "Got EXTENSION_PROCESS_CREATED notification.\n";
+ MessageLoopForUI::current()->Quit();
+ break;
+
default:
NOTREACHED();
break;