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

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

Issue 1315373005: DevTools: remove most convenience wrappers from WI.TimelineModel.Record (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 <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="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function initialize_TimelineCoalescing() 7 function initialize_TimelineCoalescing()
8 { 8 {
9 9
10 InspectorTest.dumpStats = function(presentationRecord) 10 InspectorTest.dumpStats = function(presentationRecord)
11 { 11 {
12 if (!presentationRecord.presentationParent()) 12 if (!presentationRecord.presentationParent())
13 return ""; 13 return "";
14 14
15 var model = InspectorTest.timelineModel();
15 var aggregatedStats = {}; 16 var aggregatedStats = {};
16 if (presentationRecord.coalesced()) { 17 if (presentationRecord.coalesced()) {
17 var presentationChildren = presentationRecord.presentationChildren(); 18 var presentationChildren = presentationRecord.presentationChildren();
18 for (var i = 0; i < presentationChildren.length; ++i) 19 for (var i = 0; i < presentationChildren.length; ++i)
19 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats, presentationChildren[i].record()); 20 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats, model, presentationChildren[i].record());
20 } else { 21 } else {
21 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats, pre sentationRecord.record()); 22 WebInspector.TimelineUIUtils.aggregateTimeForRecord(aggregatedStats, mod el, presentationRecord.record());
22 } 23 }
23 24
24 var timeByCategory = ""; 25 var timeByCategory = "";
25 26
26 for (category in aggregatedStats) { 27 for (category in aggregatedStats) {
27 if (timeByCategory) 28 if (timeByCategory)
28 timeByCategory += ", "; 29 timeByCategory += ", ";
29 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5) ; 30 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5) ;
30 } 31 }
31 var duration = (presentationRecord.endTime() - presentationRecord.startTime( )).toFixed(5); 32 var duration = (presentationRecord.endTime() - presentationRecord.startTime( )).toFixed(5);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 </script> 131 </script>
131 </head> 132 </head>
132 133
133 <body onload="runTest()"> 134 <body onload="runTest()">
134 <p> 135 <p>
135 Test timeline records coalescing 136 Test timeline records coalescing
136 </p> 137 </p>
137 138
138 </body> 139 </body>
139 </html> 140 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698