summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_browsertest.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 00:18:36 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-08 00:18:36 +0000
commit9c73efaf857908f0badea10859c25a7cff60a3b0 (patch)
tree5a52cebbc5e1bdc9d47966c8860b7913b3c1bb3f /chrome/browser/extensions/extension_browsertest.cc
parent1b1a9d3489b7446b2087957b7d31f03a674cff46 (diff)
downloadchromium_src-9c73efaf857908f0badea10859c25a7cff60a3b0.zip
chromium_src-9c73efaf857908f0badea10859c25a7cff60a3b0.tar.gz
chromium_src-9c73efaf857908f0badea10859c25a7cff60a3b0.tar.bz2
Add some logging to a flakey browsertest to debug.
Review URL: http://codereview.chromium.org/149291 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20103 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_browsertest.cc')
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 3dcef8b..72ac2cd 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -68,8 +68,14 @@ bool ExtensionBrowserTest::InstallExtension(const FilePath& path) {
registrar_.Remove(this, NotificationType::EXTENSION_INSTALLED,
NotificationService::AllSources());
size_t num_after = service->extensions()->size();
- if (num_after != (num_before + 1))
+ if (num_after != (num_before + 1)) {
+ std::cout << "Num extensions before: " << IntToString(num_before)
+ << "num after: " << IntToString(num_after)
+ << "Installed extensions are:\n";
+ for (size_t i = 0; i < service->extensions()->size(); ++i)
+ std::cout << " " << service->extensions()->at(i)->id() << "\n";
return false;
+ }
return WaitForExtensionHostsToLoad();
}
@@ -89,8 +95,11 @@ bool ExtensionBrowserTest::WaitForExtensionHostsToLoad() {
for (ExtensionProcessManager::const_iterator iter = manager->begin();
iter != manager->end(); ++iter) {
while (!(*iter)->did_stop_loading()) {
- if ((base::Time::Now() - start_time).InMilliseconds() > kTimeoutMs)
+ if ((base::Time::Now() - start_time).InMilliseconds() > kTimeoutMs) {
+ std::cout << "Extension host did not load for URL: "
+ << (*iter)->GetURL().spec();
return false;
+ }
MessageLoop::current()->PostDelayedTask(FROM_HERE,
new MessageLoop::QuitTask, 200);