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

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 288663003: DevTools test harness: add logToStderr method on testRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 6 years, 7 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 | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 6b0e681314192bbe59dde727ff8d9cd37eaa595f..eec4602a14ccdebd3653762007fc5e6a8a626d77 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -119,6 +119,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder(
v8::Isolate* isolate) OVERRIDE;
+ void LogToStderr(const std::string& output);
void NotifyDone();
void WaitUntilDone();
void QueueBackNavigation(int how_far_back);
@@ -295,6 +296,7 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
v8::Isolate* isolate) {
return gin::Wrappable<TestRunnerBindings>::GetObjectTemplateBuilder(isolate)
// Methods controlling test execution.
+ .SetMethod("logToStderr", &TestRunnerBindings::LogToStderr)
.SetMethod("notifyDone", &TestRunnerBindings::NotifyDone)
.SetMethod("waitUntilDone", &TestRunnerBindings::WaitUntilDone)
.SetMethod("queueBackNavigation",
@@ -528,6 +530,11 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::DumpWindowStatusChanges);
}
+void TestRunnerBindings::LogToStderr(const std::string& output) {
+ if (runner_)
pfeldman 2014/05/15 14:59:12 Is there a reason to not LOG(ERROR) here?
+ runner_->LogToStderr(output);
+}
+
void TestRunnerBindings::NotifyDone() {
if (runner_)
runner_->NotifyDone();
@@ -1752,6 +1759,10 @@ class WorkItemBackForward : public TestRunner::WorkItem {
int distance_;
};
+void TestRunner::LogToStderr(const std::string& output) {
+ LOG(ERROR) << output;
+}
+
void TestRunner::NotifyDone() {
if (disable_notify_done_)
return;
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698