diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 04:25:15 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-08 04:25:15 +0000 |
commit | d0691ffc36d299c0a4e73c876121a97360e7f77b (patch) | |
tree | 8d5a029915ba4bfffebd2caa0d7fb3bfe0f5cf2d /chrome/browser/extensions/extension_browsertest.cc | |
parent | c02c8a6860c9163b3225d378636b08fa6e3d848a (diff) | |
download | chromium_src-d0691ffc36d299c0a4e73c876121a97360e7f77b.zip chromium_src-d0691ffc36d299c0a4e73c876121a97360e7f77b.tar.gz chromium_src-d0691ffc36d299c0a4e73c876121a97360e7f77b.tar.bz2 |
Aha, I think this was racing because INSTALLED is actually fired
before LOADED. Frequently, this didn't matter because we post
a task to the message loop to quit and usually this would get
queued after the LOADED message.
But it is also possible for us to queue the quit task first,
I think.
TBR=mpcomplete
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20133 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_browsertest.cc')
-rw-r--r-- | chrome/browser/extensions/extension_browsertest.cc | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 7aa12ac..cec4a74 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -60,13 +60,13 @@ bool ExtensionBrowserTest::InstallExtension(const FilePath& path) { service->set_show_extensions_prompts(false); size_t num_before = service->extensions()->size(); - registrar_.Add(this, NotificationType::EXTENSION_INSTALLED, + registrar_.Add(this, NotificationType::EXTENSIONS_LOADED, NotificationService::AllSources()); service->InstallExtension(path); MessageLoop::current()->PostDelayedTask(FROM_HERE, new MessageLoop::QuitTask, kTimeoutMs); ui_test_utils::RunMessageLoop(); - registrar_.Remove(this, NotificationType::EXTENSION_INSTALLED, + registrar_.Remove(this, NotificationType::EXTENSIONS_LOADED, NotificationService::AllSources()); size_t num_after = service->extensions()->size(); if (num_after != (num_before + 1)) { @@ -125,11 +125,6 @@ void ExtensionBrowserTest::Observe(NotificationType type, const NotificationSource& source, const NotificationDetails& details) { switch (type.value) { - case NotificationType::EXTENSION_INSTALLED: - std::cout << "Got EXTENSION_INSTALLED notification.\n"; - MessageLoopForUI::current()->Quit(); - break; - case NotificationType::EXTENSIONS_LOADED: std::cout << "Got EXTENSION_LOADED notification.\n"; MessageLoopForUI::current()->Quit(); |