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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/console-test.js

Issue 2284123002: [DevTools] Format console.log(new Error()) same as console.log(new Error().stack) (Closed)
Patch Set: removed elipsis Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 var initialize_ConsoleTest = function() { 1 var initialize_ConsoleTest = function() {
2 2
3 InspectorTest.preloadModule("source_frame"); 3 InspectorTest.preloadModule("source_frame");
4 InspectorTest.preloadPanel("console"); 4 InspectorTest.preloadPanel("console");
5 5
6 InspectorTest.selectMainExecutionContext = function() 6 InspectorTest.selectMainExecutionContext = function()
7 { 7 {
8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts(); 8 var executionContexts = InspectorTest.mainTarget.runtimeModel.executionConte xts();
9 for (var context of executionContexts) { 9 for (var context of executionContexts) {
10 if (context.isDefault) { 10 if (context.isDefault) {
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 311 }
312 } 312 }
313 } 313 }
314 314
315 InspectorTest.expandConsoleMessagesErrorParameters = function(callback) 315 InspectorTest.expandConsoleMessagesErrorParameters = function(callback)
316 { 316 {
317 var messageViews = WebInspector.ConsoleView.instance()._visibleViewMessages; 317 var messageViews = WebInspector.ConsoleView.instance()._visibleViewMessages;
318 // Initiate round-trips to fetch necessary data for further rendering. 318 // Initiate round-trips to fetch necessary data for further rendering.
319 for (var i = 0; i < messageViews.length; ++i) 319 for (var i = 0; i < messageViews.length; ++i)
320 messageViews[i].contentElement(); 320 messageViews[i].contentElement();
321 InspectorTest.deprecatedRunAfterPendingDispatches(expandErrorParameters); 321 InspectorTest.deprecatedRunAfterPendingDispatches(callback);
322 function expandErrorParameters()
323 {
324 for (var i = 0; i < messageViews.length; ++i) {
325 var element = messageViews[i].contentElement();
326 var spans = element.querySelectorAll("span.object-value-error");
327 for (var j = 0; j < spans.length; ++j) {
328 var links = spans[j].querySelectorAll("a");
329 for (var k = 0; k < links.length; ++k) {
330 var link = links[k];
331 if (link && link._showDetailedForTest)
332 link._showDetailedForTest();
333 }
334 }
335 }
336 callback();
337 }
338 } 322 }
339 323
340 InspectorTest.waitForRemoteObjectsConsoleMessages = function(callback) 324 InspectorTest.waitForRemoteObjectsConsoleMessages = function(callback)
341 { 325 {
342 var messages = WebInspector.ConsoleView.instance()._visibleViewMessages; 326 var messages = WebInspector.ConsoleView.instance()._visibleViewMessages;
343 for (var i = 0; i < messages.length; ++i) 327 for (var i = 0; i < messages.length; ++i)
344 messages[i].toMessageElement(); 328 messages[i].toMessageElement();
345 InspectorTest.deprecatedRunAfterPendingDispatches(callback); 329 InspectorTest.deprecatedRunAfterPendingDispatches(callback);
346 } 330 }
347 331
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 if (consoleView._visibleViewMessages.length === expectedCount) { 407 if (consoleView._visibleViewMessages.length === expectedCount) {
424 InspectorTest.addResult("Message count: " + expectedCount); 408 InspectorTest.addResult("Message count: " + expectedCount);
425 callback(); 409 callback();
426 } else { 410 } else {
427 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn); 411 InspectorTest.addSniffer(consoleView, "_messageAppendedForTests", ch eckAndReturn);
428 } 412 }
429 } 413 }
430 } 414 }
431 415
432 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698