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

Unified Diff: components/test_runner/test_runner.cc

Issue 2496613003: Suppress text dump of JavaScript modal dialog messages in testharness.js tests (Closed)
Patch Set: Created 4 years, 1 month 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 | « components/test_runner/test_runner.h ('k') | components/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « components/test_runner/test_runner.h ('k') | components/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698