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

Unified Diff: Source/testing/runner/WebTestProxy.cpp

Issue 26770004: Add console message levels to test expectation output. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Tests. Created 7 years, 2 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 | « LayoutTests/webexposed/global-constructors-listing-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/testing/runner/WebTestProxy.cpp
diff --git a/Source/testing/runner/WebTestProxy.cpp b/Source/testing/runner/WebTestProxy.cpp
index f6b40b5a1c9f9904bf78544e463c12b8834460e3..66f5f9ea549d8fc026b18f5e87ed97b4b2186ee0 100644
--- a/Source/testing/runner/WebTestProxy.cpp
+++ b/Source/testing/runner/WebTestProxy.cpp
@@ -1313,7 +1313,22 @@ void WebTestProxyBase::didAddMessageToConsole(const WebConsoleMessage& message,
// This matches win DumpRenderTree's UIDelegate.cpp.
if (!m_logConsoleOutput)
return;
- m_delegate->printMessage(string("CONSOLE MESSAGE: "));
+ string level;
+ switch (message.level) {
+ case WebConsoleMessage::LevelDebug:
+ level = "DEBUG";
+ break;
+ case WebConsoleMessage::LevelLog:
+ level = "MESSAGE";
+ break;
+ case WebConsoleMessage::LevelWarning:
+ level = "WARNING";
+ break;
+ case WebConsoleMessage::LevelError:
+ level = "ERROR";
+ break;
+ }
+ m_delegate->printMessage(string("CONSOLE ") + level + ": ");
if (sourceLine) {
char buffer[40];
snprintf(buffer, sizeof(buffer), "line %d: ", sourceLine);
« no previous file with comments | « LayoutTests/webexposed/global-constructors-listing-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698