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

Unified Diff: content/shell/browser/layout_test/blink_test_controller.cc

Issue 2678043002: Hide console log messages for imported WPT tests (Closed)
Patch Set: Revert python change Created 3 years, 9 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
Index: content/shell/browser/layout_test/blink_test_controller.cc
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
index 0a5460823bd3c1354863413c0a2c2033d60baac6..32ed257fda8d08f324b7a70a588233d4bf45fd6c 100644
--- a/content/shell/browser/layout_test/blink_test_controller.cc
+++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -168,6 +168,10 @@ void BlinkTestResultPrinter::PrintAudioFooter() {
state_ = IN_IMAGE_BLOCK;
}
+void BlinkTestResultPrinter::AddLogMessage(const std::string& message) {
+ *error_ << message;
+}
+
void BlinkTestResultPrinter::AddMessage(const std::string& message) {
AddMessageRaw(message + "\n");
}
@@ -420,6 +424,7 @@ bool BlinkTestController::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(BlinkTestController, message)
IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintMessage, OnPrintMessage)
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_PrintLogMessage, OnPrintLogMessage)
IPC_MESSAGE_HANDLER(ShellViewHostMsg_TextDump, OnTextDump)
IPC_MESSAGE_HANDLER(ShellViewHostMsg_InitiateLayoutDump,
OnInitiateLayoutDump)
@@ -775,6 +780,10 @@ void BlinkTestController::OnPrintMessage(const std::string& message) {
printer_->AddMessageRaw(message);
}
+void BlinkTestController::OnPrintLogMessage(const std::string& message) {
+ printer_->AddLogMessage(message);
+}
+
void BlinkTestController::OnOverridePreferences(const WebPreferences& prefs) {
should_override_prefs_ = true;
prefs_ = prefs;

Powered by Google App Engine
This is Rietveld 408576698