Index: chrome/browser/extensions/extension_browsertest.cc |
=================================================================== |
--- chrome/browser/extensions/extension_browsertest.cc (revision 32255) |
+++ chrome/browser/extensions/extension_browsertest.cc (working copy) |
@@ -116,15 +116,10 @@ |
} |
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 @@ |
MessageLoopForUI::current()->Quit(); |
break; |
+ case NotificationType::EXTENSION_PROCESS_CREATED: |
+ std::cout << "Got EXTENSION_PROCESS_CREATED notification.\n"; |
+ MessageLoopForUI::current()->Quit(); |
+ break; |
+ |
default: |
NOTREACHED(); |
break; |