From 7d11cee248f8a36b628d982e133eb10195f178ad Mon Sep 17 00:00:00 2001 From: "aa@chromium.org" Date: Wed, 8 Jul 2009 02:40:42 +0000 Subject: Add some more logging. Still trying to figure out flakey test. TBR=mpcomplete git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20126 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/extensions/extension_browsertest.cc | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 72ac2cd..7aa12ac 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -9,6 +9,7 @@ #include "chrome/browser/profile.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_paths.h" +#include "chrome/common/extensions/extension_error_reporter.h" #include "chrome/common/notification_registrar.h" #include "chrome/common/notification_service.h" #include "chrome/common/notification_type.h" @@ -69,11 +70,21 @@ bool ExtensionBrowserTest::InstallExtension(const FilePath& path) { NotificationService::AllSources()); size_t num_after = service->extensions()->size(); if (num_after != (num_before + 1)) { - std::cout << "Num extensions before: " << IntToString(num_before) - << "num after: " << IntToString(num_after) - << "Installed extensions are:\n"; + std::cout << "Num extensions before: " << IntToString(num_before) << " " + << "num after: " << IntToString(num_after) << " " + << "Installed extensions follow:\n"; + for (size_t i = 0; i < service->extensions()->size(); ++i) std::cout << " " << service->extensions()->at(i)->id() << "\n"; + + std::cout << "Errors follow:\n"; + const std::vector* errors = + ExtensionErrorReporter::GetInstance()->GetErrors(); + for (std::vector::const_iterator iter = errors->begin(); + iter != errors->end(); ++iter) { + std::cout << *iter << "\n"; + } + return false; } @@ -115,9 +126,15 @@ void ExtensionBrowserTest::Observe(NotificationType type, 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(); break; + default: NOTREACHED(); break; -- cgit v1.1