| Index: components/test_runner/test_runner.cc
|
| diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
|
| index 00aae7cdd35e10d22fa0f8b0450835cb48d8b5a6..e96d2c77751299149e3e6579415051d50b883a69 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 SetDomainRelaxationForbiddenForURLScheme(bool forbidden,
|
| const std::string& scheme);
|
| void SetDumpConsoleMessages(bool value);
|
| + void SetDumpJavaScriptDialogs(bool value);
|
| void SetEffectiveConnectionType(const std::string& connection_type);
|
| void SetMockSpellCheckerEnabled(bool enabled);
|
| void SetImagesAllowed(bool allowed);
|
| @@ -517,6 +518,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
|
| &TestRunnerBindings::SetDomainRelaxationForbiddenForURLScheme)
|
| .SetMethod("setDumpConsoleMessages",
|
| &TestRunnerBindings::SetDumpConsoleMessages)
|
| + .SetMethod("setDumpJavaScriptDialogs",
|
| + &TestRunnerBindings::SetDumpJavaScriptDialogs)
|
| .SetMethod("setEffectiveConnectionType",
|
| &TestRunnerBindings::SetEffectiveConnectionType)
|
| .SetMethod("setMockSpellCheckerEnabled",
|
| @@ -714,6 +717,11 @@ void TestRunnerBindings::SetDumpConsoleMessages(bool enabled) {
|
| runner_->SetDumpConsoleMessages(enabled);
|
| }
|
|
|
| +void TestRunnerBindings::SetDumpJavaScriptDialogs(bool enabled) {
|
| + if (runner_)
|
| + runner_->SetDumpJavaScriptDialogs(enabled);
|
| +}
|
| +
|
| void TestRunnerBindings::SetEffectiveConnectionType(
|
| const std::string& connection_type) {
|
| blink::WebEffectiveConnectionType web_type =
|
| @@ -2617,6 +2625,11 @@ void TestRunner::SetDumpConsoleMessages(bool value) {
|
| OnLayoutTestRuntimeFlagsChanged();
|
| }
|
|
|
| +void TestRunner::SetDumpJavaScriptDialogs(bool value) {
|
| + layout_test_runtime_flags_.set_dump_javascript_dialogs(value);
|
| + OnLayoutTestRuntimeFlagsChanged();
|
| +}
|
| +
|
| void TestRunner::SetEffectiveConnectionType(
|
| blink::WebEffectiveConnectionType connection_type) {
|
| effective_connection_type_ = connection_type;
|
| @@ -2630,6 +2643,10 @@ bool TestRunner::ShouldDumpConsoleMessages() const {
|
| return layout_test_runtime_flags_.dump_console_messages();
|
| }
|
|
|
| +bool TestRunner::ShouldDumpJavaScriptDialogs() const {
|
| + return layout_test_runtime_flags_.dump_javascript_dialogs();
|
| +}
|
| +
|
| void TestRunner::CloseWebInspector() {
|
| delegate_->CloseDevTools();
|
| }
|
|
|