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: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2139043002: DevTools: show alternate title onexpand of object in console (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments 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 | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-call-getter-on-proto-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
index fd341208f6d3b16d4bca85a44704212991392dc1..5255bdd790ad703ab71ca9c8dc4e43cedc316343 100644
--- a/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
+++ b/third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js
@@ -56,9 +56,9 @@ InspectorTest.evaluateInConsoleAndDump = function(code, callback, dontForceMainC
InspectorTest.evaluateInConsole(code, mycallback, dontForceMainContext);
}
-InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessage)
+InspectorTest.cleanConsoleMessageText = function(messageText)
{
- var messageText = messageElement.deepTextContent().replace(/\u200b/g, "");
+ messageText.replace(/\u200b/g, "");
// Replace scriptIds with generic scriptId string to avoid flakiness.
messageText = messageText.replace(/VM\d+/g, "VM");
if (messageText.startsWith("Navigated to")) {
@@ -70,6 +70,27 @@ InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessag
return messageText;
}
+InspectorTest.prepareConsoleMessageText = function(messageElement, consoleMessage)
+{
+ var messageText = messageElement.deepTextContent();
+ return InspectorTest.cleanConsoleMessageText(messageText);
+}
+
+InspectorTest.dumpConsoleMessagesWithObjectProperties = function(messageElement, consoleMessage)
lushnikov 2016/08/05 01:42:04 let's reuse the existing infrastructure (see conso
luoe 2016/08/05 01:48:10 Done.
+{
+ var messageText = messageElement.childTextNodes().map(formatPropertyNames).join("");
+ return InspectorTest.cleanConsoleMessageText(messageText);
+
+ function formatPropertyNames(node) {
+ if (node.parentElement && node.parentElement.parentElement && node.parentElement.parentElement.classList.contains("console-view-object-properties-section"))
+ return "\n" + node.textContent;
+ if (node.parentElement && node.parentElement.classList.contains("name"))
+ return "\n" + node.textContent;
+ else
+ return node.textContent;
+ }
+}
+
InspectorTest.disableConsoleViewport = function()
{
InspectorTest.fixConsoleViewportDimensions(600, 2000);
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/console/console-call-getter-on-proto-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698