diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 02:41:26 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 02:41:26 +0000 |
commit | 9610ef248891f4be129eb915a43d226350569910 (patch) | |
tree | e0d45f8c90d82ec4b95120b2a6926e5b1e4dfd80 /chrome/browser/extensions/extension_browsertest.cc | |
parent | f7906654d9ffbf1385843b4c7457797564273a56 (diff) | |
download | chromium_src-9610ef248891f4be129eb915a43d226350569910.zip chromium_src-9610ef248891f4be129eb915a43d226350569910.tar.gz chromium_src-9610ef248891f4be129eb915a43d226350569910.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. (relanding 32203)
BUG=6844
Review URL: http://codereview.chromium.org/397031
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32264 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_browsertest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_browsertest.cc | 14 |
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; |