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

Unified Diff: components/test_runner/test_runner.cc

Issue 2191143002: Opt-in stripping of line numbers from console messages of layout tests. Base URL: https://chromium.googlesource.com/chromium/src.git@csp-reporting-ipcs
Patch Set: Rebasing... Created 4 years, 4 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 | « 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 cf41203f1ffe0ada8dd76989f7c8387154cd1e84..3790ade8591a06682bc11ad56b0a29918e721084 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -254,6 +254,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void ShowWebInspector(gin::Arguments* args);
void SimulateWebNotificationClick(const std::string& title, int action_index);
void SimulateWebNotificationClose(const std::string& title, bool by_user);
+ void StripLineNumbersFromConsoleMessages();
void UseUnfortunateSynchronousResizeMode();
void WaitForPolicyDelegate();
void WaitUntilDone();
@@ -571,6 +572,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("setWindowIsKey", &TestRunnerBindings::SetWindowIsKey)
.SetMethod("setXSSAuditorEnabled",
&TestRunnerBindings::SetXSSAuditorEnabled)
+ .SetMethod("stripLineNumbersFromConsoleMessages",
+ &TestRunnerBindings::StripLineNumbersFromConsoleMessages)
.SetMethod("showWebInspector", &TestRunnerBindings::ShowWebInspector)
.SetMethod("simulateWebNotificationClick",
&TestRunnerBindings::SimulateWebNotificationClick)
@@ -1199,6 +1202,11 @@ void TestRunnerBindings::SetUseMockTheme(bool use) {
runner_->SetUseMockTheme(use);
}
+void TestRunnerBindings::StripLineNumbersFromConsoleMessages() {
+ if (runner_)
+ runner_->StripLineNumbersFromConsoleMessages();
+}
+
void TestRunnerBindings::WaitUntilExternalURLLoad() {
if (runner_)
runner_->WaitUntilExternalURLLoad();
@@ -1828,6 +1836,10 @@ bool TestRunner::shouldWaitUntilExternalURLLoad() const {
return layout_test_runtime_flags_.wait_until_external_url_load();
}
+bool TestRunner::shouldDumpConsoleLineNumbers() const {
+ return layout_test_runtime_flags_.include_line_numbers_in_console_messages();
+}
+
const std::set<std::string>* TestRunner::httpHeadersToClear() const {
return &http_headers_to_clear_;
}
@@ -2562,6 +2574,12 @@ void TestRunner::WaitUntilExternalURLLoad() {
OnLayoutTestRuntimeFlagsChanged();
}
+void TestRunner::StripLineNumbersFromConsoleMessages() {
+ layout_test_runtime_flags_.set_include_line_numbers_in_console_messages(
+ false);
+ OnLayoutTestRuntimeFlagsChanged();
+}
+
void TestRunner::DumpDragImage() {
layout_test_runtime_flags_.set_dump_drag_image(true);
DumpAsTextWithPixelResults();
« 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