summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 22:00:37 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-05 22:00:37 +0000
commitb739bca14bd4b3d5570fc6a5193123d29215080b (patch)
tree6e12b4966c2403163335026a0a646fa0ba2e5307 /chrome/browser/extensions
parent39690e106cdb6a4515df2d488ba8a7e6e2aa00d8 (diff)
downloadchromium_src-b739bca14bd4b3d5570fc6a5193123d29215080b.zip
chromium_src-b739bca14bd4b3d5570fc6a5193123d29215080b.tar.gz
chromium_src-b739bca14bd4b3d5570fc6a5193123d29215080b.tar.bz2
extension tests: use LOG(INFO) rather than std::cout
I want to see timestamps for these logging messages on the buildbots. Matt said they were using std::cout to work around LOG(INFO) not printing, but we fixed LOG(INFO) so that shouldn't matter anymore. Review URL: http://codereview.chromium.org/3562006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61569 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_apitest.cc4
-rw-r--r--chrome/browser/extensions/extension_browsertest.cc32
2 files changed, 18 insertions, 18 deletions
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc
index 7ef7c1a..da9e01c 100644
--- a/chrome/browser/extensions/extension_apitest.cc
+++ b/chrome/browser/extensions/extension_apitest.cc
@@ -57,7 +57,7 @@ void ExtensionApiTest::ResultCatcher::Observe(
switch (type.value) {
case NotificationType::EXTENSION_TEST_PASSED:
- std::cout << "Got EXTENSION_TEST_PASSED notification.\n";
+ LOG(INFO) << "Got EXTENSION_TEST_PASSED notification.";
results_.push_back(true);
messages_.push_back("");
if (waiting_)
@@ -65,7 +65,7 @@ void ExtensionApiTest::ResultCatcher::Observe(
break;
case NotificationType::EXTENSION_TEST_FAILED:
- std::cout << "Got EXTENSION_TEST_FAILED notification.\n";
+ LOG(INFO) << "Got EXTENSION_TEST_FAILED notification.";
results_.push_back(false);
messages_.push_back(*(Details<std::string>(details).ptr()));
if (waiting_)
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 05f8cec..aa5b46a 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -142,20 +142,20 @@ bool ExtensionBrowserTest::InstallOrUpdateExtension(const std::string& id,
size_t num_after = service->extensions()->size();
if (num_after != (num_before + expected_change)) {
- std::cout << "Num extensions before: "
+ LOG(INFO) << "Num extensions before: "
<< base::IntToString(num_before) << " "
<< "num after: " << base::IntToString(num_after) << " "
- << "Installed extensions follow:\n";
+ << "Installed extensions follow:";
for (size_t i = 0; i < service->extensions()->size(); ++i)
- std::cout << " " << service->extensions()->at(i)->id() << "\n";
+ LOG(INFO) << " " << service->extensions()->at(i)->id();
- std::cout << "Errors follow:\n";
+ LOG(INFO) << "Errors follow:";
const std::vector<std::string>* errors =
ExtensionErrorReporter::GetInstance()->GetErrors();
for (std::vector<std::string>::const_iterator iter = errors->begin();
iter != errors->end(); ++iter) {
- std::cout << *iter << "\n";
+ LOG(INFO) << *iter;
}
return false;
@@ -281,47 +281,47 @@ void ExtensionBrowserTest::Observe(NotificationType type,
switch (type.value) {
case NotificationType::EXTENSION_LOADED:
last_loaded_extension_id_ = Details<Extension>(details).ptr()->id();
- std::cout << "Got EXTENSION_LOADED notification.\n";
+ LOG(INFO) << "Got EXTENSION_LOADED notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_UPDATE_DISABLED:
- std::cout << "Got EXTENSION_UPDATE_DISABLED notification.\n";
+ LOG(INFO) << "Got EXTENSION_UPDATE_DISABLED notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_HOST_DID_STOP_LOADING:
- std::cout << "Got EXTENSION_HOST_DID_STOP_LOADING notification.\n";
+ LOG(INFO) << "Got EXTENSION_HOST_DID_STOP_LOADING notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_INSTALLED:
- std::cout << "Got EXTENSION_INSTALLED notification.\n";
+ LOG(INFO) << "Got EXTENSION_INSTALLED notification.";
++extension_installs_observed_;
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_INSTALL_ERROR:
- std::cout << "Got EXTENSION_INSTALL_ERROR notification.\n";
+ LOG(INFO) << "Got EXTENSION_INSTALL_ERROR notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_PROCESS_CREATED:
- std::cout << "Got EXTENSION_PROCESS_CREATED notification.\n";
+ LOG(INFO) << "Got EXTENSION_PROCESS_CREATED notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_PROCESS_TERMINATED:
- std::cout << "Got EXTENSION_PROCESS_TERMINATED notification.\n";
+ LOG(INFO) << "Got EXTENSION_PROCESS_TERMINATED notification.";
MessageLoopForUI::current()->Quit();
break;
case NotificationType::EXTENSION_PAGE_ACTION_COUNT_CHANGED: {
LocationBarTesting* location_bar =
browser()->window()->GetLocationBar()->GetLocationBarForTesting();
- std::cout << "Got EXTENSION_PAGE_ACTION_COUNT_CHANGED "
+ LOG(INFO) << "Got EXTENSION_PAGE_ACTION_COUNT_CHANGED "
<< "notification. Number of page actions: "
- << location_bar->PageActionCount() << "\n";
+ << location_bar->PageActionCount() << "";
if (location_bar->PageActionCount() ==
target_page_action_count_) {
target_page_action_count_ = -1;
@@ -333,9 +333,9 @@ void ExtensionBrowserTest::Observe(NotificationType type,
case NotificationType::EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED: {
LocationBarTesting* location_bar =
browser()->window()->GetLocationBar()->GetLocationBarForTesting();
- std::cout << "Got EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED "
+ LOG(INFO) << "Got EXTENSION_PAGE_ACTION_VISIBILITY_CHANGED "
<< "notification. Number of visible page actions: "
- << location_bar->PageActionVisibleCount() << "\n";
+ << location_bar->PageActionVisibleCount();
if (location_bar->PageActionVisibleCount() ==
target_visible_page_action_count_) {
target_visible_page_action_count_ = -1;