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; |