Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(859)

Unified Diff: components/html_viewer/web_test_delegate_impl.cc

Issue 1308973005: html_viewer/web_view: An app for running layout-tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot/merge Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.h ('k') | components/web_view/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/web_test_delegate_impl.cc
diff --git a/components/html_viewer/web_test_delegate_impl.cc b/components/html_viewer/web_test_delegate_impl.cc
index 613420a57167b81c82564d2c772c012ce18b884a..cc9e9cb06f2d6e964400d2600f65d4a8899330f3 100644
--- a/components/html_viewer/web_test_delegate_impl.cc
+++ b/components/html_viewer/web_test_delegate_impl.cc
@@ -4,6 +4,8 @@
#include "components/html_viewer/web_test_delegate_impl.h"
+#include <iostream>
+
#include "base/time/time.h"
#include "cc/layers/texture_layer.h"
#include "components/test_runner/web_task.h"
@@ -85,7 +87,7 @@ void WebTestDelegateImpl::DidChangeBatteryStatus(
}
void WebTestDelegateImpl::PrintMessage(const std::string& message) {
- fprintf(stderr, "%s", message.c_str());
+ std::cout << message;
}
void WebTestDelegateImpl::PostTask(test_runner::WebTask* task) {
@@ -228,9 +230,13 @@ void WebTestDelegateImpl::SetLocale(const std::string& locale) {
}
void WebTestDelegateImpl::TestFinished() {
+ std::cout << "Content-Type: text/plain\n";
+ std::cout << (proxy_ ? proxy_->CaptureTree(false, false) : dump_tree_);
+ std::cout << "#EOF\n";
+
test_interfaces_->SetTestIsRunning(false);
- fprintf(stderr, "%s", proxy_ ? proxy_->CaptureTree(false, false).c_str()
- : dump_tree_.c_str());
+ if (!completion_callback_.is_null())
+ completion_callback_.Run();
}
void WebTestDelegateImpl::CloseRemainingWindows() {
« no previous file with comments | « components/html_viewer/web_test_delegate_impl.h ('k') | components/web_view/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698