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

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 | « no previous file | 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 c76acd35685c72af5659594614053b44b55a5448..1a1b3253272aeac7dafdc7f7fb165a25bba26447 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,10 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
&TestRunnerBindings::DumpWindowStatusChanges);
}
+void TestRunnerBindings::LogToStderr(const std::string& output) {
+ LOG(ERROR) << output;
+}
+
void TestRunnerBindings::NotifyDone() {
if (runner_)
runner_->NotifyDone();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698