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

Side by Side Diff: LayoutTests/inspector/tracing/timeline-js-callstacks.html

Issue 1293273002: DevTools: Use better event titles on timeline tree view. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update the test. Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-js-callstacks-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../tracing-test.js"></script> 4 <script src="../tracing-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var sessionId = "6.23"; 8 var sessionId = "6.23";
9 var rawTraceEvents = [ 9 var rawTraceEvents = [
10 { 10 {
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 WebInspector.TimelineUIUtils.hiddenEventsFilter(), 437 WebInspector.TimelineUIUtils.hiddenEventsFilter(),
438 new WebInspector.ExcludeTopLevelFilter() 438 new WebInspector.ExcludeTopLevelFilter()
439 ]; 439 ];
440 var treeTopDown = WebInspector.TimelineModel.buildTopDownTree(events, 0, Inf inity, filters, WebInspector.TimelineTreeView.prototype._eventId); 440 var treeTopDown = WebInspector.TimelineModel.buildTopDownTree(events, 0, Inf inity, filters, WebInspector.TimelineTreeView.prototype._eventId);
441 printProfileTree(0, treeTopDown); 441 printProfileTree(0, treeTopDown);
442 var treeBottomUp = WebInspector.TimelineModel.buildBottomUpTree(treeTopDown) ; 442 var treeBottomUp = WebInspector.TimelineModel.buildBottomUpTree(treeTopDown) ;
443 printProfileTree(0, treeBottomUp); 443 printProfileTree(0, treeBottomUp);
444 444
445 function printProfileTree(padding, node) 445 function printProfileTree(padding, node)
446 { 446 {
447 InspectorTest.addResult(" ".repeat(padding) + node.name + ": " + [node. selfTime, node.totalTime].map(function (t) { return t.toFixed(3); }).join(" ")) ; 447 var name = node.name || (node.event.name === WebInspector.TimelineModel. RecordType.JSFrame
448 ? WebInspector.beautifyFunctionName(node.event.args["data"]["functio nName"])
449 : WebInspector.TimelineUIUtils.eventTitle(node.event));
450 InspectorTest.addResult(" ".repeat(padding) + name + ": " + [node.selfT ime, node.totalTime].map(function (t) { return t.toFixed(3); }).join(" "));
448 (node.children || new Map()).forEach(printProfileTree.bind(null, padding + 1)); 451 (node.children || new Map()).forEach(printProfileTree.bind(null, padding + 1));
449 } 452 }
450 453
451 InspectorTest.completeTest(); 454 InspectorTest.completeTest();
452 } 455 }
453 456
454 </script> 457 </script>
455 </head> 458 </head>
456 <body onload="runTest()"> 459 <body onload="runTest()">
457 </body> 460 </body>
458 </html> 461 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-js-callstacks-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698