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

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

Issue 183893010: DevTools: extract TimelineModel.Record from TimelinePresentationModel.Record. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 6 years, 9 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 | Annotate | Revision Log
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(record) 10 InspectorTest.dumpStats = function(record)
11 { 11 {
12 if (!record.parent) 12 if (record.type === "Root")
13 return ""; 13 return "";
14 var aggregatedStats = record.aggregatedStats; 14 var aggregatedStats = record.aggregatedStats;
15 var timeByCategory = ""; 15 var timeByCategory = "";
16 16
17 for (category in aggregatedStats) { 17 for (category in aggregatedStats) {
18 if (timeByCategory) 18 if (timeByCategory)
19 timeByCategory += ", "; 19 timeByCategory += ", ";
20 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5) ; 20 timeByCategory += category + ": " + aggregatedStats[category].toFixed(5) ;
21 } 21 }
22 var duration = (record.endTime - record.startTime).toFixed(5); 22 var duration = (record.endTime - record.startTime).toFixed(5);
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 {"startTime":4200.001, "endTime":4299.9,"type":"Paint","frameId":"2" ,"data":{ type: "mouseover" }} 77 {"startTime":4200.001, "endTime":4299.9,"type":"Paint","frameId":"2" ,"data":{ type: "mouseover" }}
78 ]}, 78 ]},
79 {"startTime":4300.000,"data":{},"endTime":4399.999,"type":"Program","chi ldren":[ 79 {"startTime":4300.000,"data":{},"endTime":4399.999,"type":"Program","chi ldren":[
80 {"startTime":4300.001, "endTime":4399.9,"type":"Paint","frameId":"2" ,"data":{ type: "keydown" }} 80 {"startTime":4300.001, "endTime":4399.9,"type":"Paint","frameId":"2" ,"data":{ type: "keydown" }}
81 ]} 81 ]}
82 ]; 82 ];
83 83
84 InspectorTest.loadTimelineRecords(records); 84 InspectorTest.loadTimelineRecords(records);
85 85
86 var rootRecord = InspectorTest.timelinePresentationModel().rootRecord(); 86 var rootRecord = InspectorTest.timelinePresentationModel().rootRecord();
87 InspectorTest.dumpTimelineRecord(rootRecord, InspectorTest.dumpStats); 87 InspectorTest.dumpPresentationRecord(rootRecord, InspectorTest.dumpStats);
88 var coalesced = rootRecord.children[0]; 88 var coalesced = rootRecord.presentationChildren()[0];
89 InspectorTest.addResult("coalesced record's hasWarnings(): " + coalesced.has Warnings()); 89 InspectorTest.addResult("coalesced record's hasWarnings(): " + coalesced.has Warnings());
90 InspectorTest.addResult("coalesced record's childHasWarnings(): " + coalesce d.childHasWarnings()); 90 InspectorTest.addResult("coalesced record's childHasWarnings(): " + coalesce d.childHasWarnings());
91 InspectorTest.completeTest(); 91 InspectorTest.completeTest();
92 } 92 }
93 93
94 </script> 94 </script>
95 </head> 95 </head>
96 96
97 <body onload="runTest()"> 97 <body onload="runTest()">
98 <p> 98 <p>
99 Test timeline records coalescing 99 Test timeline records coalescing
100 </p> 100 </p>
101 101
102 </body> 102 </body>
103 </html> 103 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698