summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browsertest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 20:23:57 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 20:23:57 +0000
commit8f44326c296a4324c9a2696e26dba67178f63c24 (patch)
tree4415027e022daeb306027452648a23d18174437d /chrome/browser/extensions/extension_browsertest.cc
parent5344ba96a3df57e9d0b74bd09aac37c9c781a2fc (diff)
downloadchromium_src-8f44326c296a4324c9a2696e26dba67178f63c24.zip
chromium_src-8f44326c296a4324c9a2696e26dba67178f63c24.tar.gz
chromium_src-8f44326c296a4324c9a2696e26dba67178f63c24.tar.bz2
Launch processes asynchronously so as not to block the UI thread. For now, renderer only, I'll take care of plugin/worker/utility processes in a followup change.
BUG=6844 Review URL: http://codereview.chromium.org/397002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32203 0039d316-1c4b-4281-b951-d872f2087c98
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;