| Index: components/test_runner/test_runner.cc
|
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
|
| index 18285eb09bd27972a340151d90fd4623e407a1df..99d728b2a6f11354303aa9158f0351c51ffe984d 100644
|
| --- a/components/test_runner/test_runner.cc
|
| +++ b/components/test_runner/test_runner.cc
|
| @@ -211,6 +211,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
|
| void SetDatabaseQuota(int quota);
|
| void SetDomainRelaxationForbiddenForURLScheme(bool forbidden,
|
| const std::string& scheme);
|
| + void SetDumpConsoleMessages(bool value);
|
| void SetImagesAllowed(bool allowed);
|
| void SetIsolatedWorldContentSecurityPolicy(int world_id,
|
| const std::string& policy);
|
| @@ -511,6 +512,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| .SetMethod("setDatabaseQuota", &TestRunnerBindings::SetDatabaseQuota)
|
| .SetMethod("setDomainRelaxationForbiddenForURLScheme",
|
| &TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme)
|
| + .SetMethod("setDumpConsoleMessages",
|
| + &TestRunnerBindings::SetDumpConsoleMessages)
|
| .SetMethod("setIconDatabaseEnabled", &TestRunnerBindings::NotImplemented)
|
| .SetMethod("setImagesAllowed", &TestRunnerBindings::SetImagesAllowed)
|
| .SetMethod("setIsolatedWorldContentSecurityPolicy",
|
| @@ -697,6 +700,11 @@ void TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme(
|
| view_runner_->SetDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
|
| }
|
|
|
| +void TestRunnerBindings::SetDumpConsoleMessages(bool enabled) {
|
| + if (runner_)
|
| + runner_->SetDumpConsoleMessages(enabled);
|
| +}
|
| +
|
| v8::Local<v8::Value>
|
| TestRunnerBindings::EvaluateScriptInIsolatedWorldAndReturnValue(
|
| int world_id, const std::string& script) {
|
| @@ -2553,6 +2561,15 @@ void TestRunner::DumpNavigationPolicy() {
|
| OnLayoutTestRuntimeFlagsChanged();
|
| }
|
|
|
| +void TestRunner::SetDumpConsoleMessages(bool value) {
|
| + layout_test_runtime_flags_.set_dump_console_messages(value);
|
| + OnLayoutTestRuntimeFlagsChanged();
|
| +}
|
| +
|
| +bool TestRunner::ShouldDumpConsoleMessages() const {
|
| + return layout_test_runtime_flags_.dump_console_messages();
|
| +}
|
| +
|
| void TestRunner::CloseWebInspector() {
|
| delegate_->CloseDevTools();
|
| }
|
|
|