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

Unified Diff: LayoutTests/http/tests/inspector/console-test.js

Issue 650203003: Revert of Catch uncaught promise rejections from V8 and log to console. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: LayoutTests/http/tests/inspector/console-test.js
diff --git a/LayoutTests/http/tests/inspector/console-test.js b/LayoutTests/http/tests/inspector/console-test.js
index d59d68ea23c4fe60fc07290f3028df92318f81af..5d27524d4e2d7ecc5b38f8071e3e14bd6da41735 100644
--- a/LayoutTests/http/tests/inspector/console-test.js
+++ b/LayoutTests/http/tests/inspector/console-test.js
@@ -74,11 +74,6 @@
InspectorTest.dumpConsoleMessages = function(printOriginatingCommand, dumpClassNames, formatter)
{
- InspectorTest.addResults(InspectorTest.dumpConsoleMessagesIntoArray(printOriginatingCommand, dumpClassNames, formatter));
-}
-
-InspectorTest.dumpConsoleMessagesIntoArray = function(printOriginatingCommand, dumpClassNames, formatter)
-{
formatter = formatter || InspectorTest.prepareConsoleMessageText;
var result = [];
InspectorTest.disableConsoleViewport();
@@ -99,21 +94,21 @@
}
}
- if (InspectorTest.dumpConsoleTableMessage(uiMessage, false, result)) {
+ if (InspectorTest.dumpConsoleTableMessage(uiMessage, false)) {
if (dumpClassNames)
- result.push(classNames.join(" > "));
+ InspectorTest.addResult(classNames.join(" > "));
} else {
var messageText = formatter(element, message);
- result.push(messageText + (dumpClassNames ? " " + classNames.join(" > ") : ""));
+ InspectorTest.addResult(messageText + (dumpClassNames ? " " + classNames.join(" > ") : ""));
}
if (printOriginatingCommand && uiMessage.consoleMessage().originatingMessage())
- result.push("Originating from: " + uiMessage.consoleMessage().originatingMessage().messageText);
+ InspectorTest.addResult("Originating from: " + uiMessage.consoleMessage().originatingMessage().messageText);
}
return result;
}
-InspectorTest.dumpConsoleTableMessage = function(viewMessage, forceInvalidate, results)
+InspectorTest.dumpConsoleTableMessage = function(viewMessage, forceInvalidate)
{
if (forceInvalidate)
WebInspector.ConsolePanel._view()._viewport.invalidate();
@@ -126,7 +121,7 @@
for (var i = 0; i < headers.length; i++)
headerLine += headers[i].textContent + " | ";
- addResult("HEADER " + headerLine);
+ InspectorTest.addResult("HEADER " + headerLine);
var rows = table.querySelectorAll(".data-container tr");
@@ -138,17 +133,8 @@
rowLine += items[j].textContent + " | ";
if (rowLine.trim())
- addResult("ROW " + rowLine);
- }
-
- function addResult(x)
- {
- if (results)
- results.push(x);
- else
- InspectorTest.addResult(x);
- }
-
+ InspectorTest.addResult("ROW " + rowLine);
+ }
return true;
}

Powered by Google App Engine
This is Rietveld 408576698