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

Side by Side Diff: LayoutTests/inspector/timeline/trace-event-self-time.html

Issue 310313003: Introduce TracingTimelineModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/tracing/decode-resize.html » ('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> 4 <script>
5 function test() 5 function test()
6 { 6 {
7 WebInspector.inspectorView.showPanel("timeline"); 7 WebInspector.inspectorView.showPanel("timeline");
8 var sessionId = "6.23"; 8 var sessionId = "6.23";
9 var rawTraceEvents = [ 9 var rawTraceEvents = [
10 { 10 {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 "name": "Program", 182 "name": "Program",
183 "ph": "E", 183 "ph": "E",
184 "pid": 17851, 184 "pid": 17851,
185 "tid": 23, 185 "tid": 23,
186 "ts": 500, 186 "ts": 500,
187 "tts": 5612506 187 "tts": 5612506
188 } 188 }
189 ]; 189 ];
190 190
191 var model = new WebInspector.TracingModel(); 191 var model = new WebInspector.TracingModel();
192 var tracineTimelineModel = new WebInspector.TracingTimelineModel(model);
193 tracineTimelineModel.willStartRecordingTraceEvents();
192 model.setSessionIdForTest(sessionId); 194 model.setSessionIdForTest(sessionId);
193 model._eventsCollected(rawTraceEvents); 195 model._eventsCollected(rawTraceEvents);
194 model._tracingComplete(); 196 model._tracingComplete();
195 var events = model.inspectedTargetEvents(); 197 tracineTimelineModel.didStopRecordingTraceEvents();
196 var bindings = new WebInspector.TimelineTraceEventBindings(); 198 var events = tracineTimelineModel.inspectedTargetEvents();
197 bindings.setEvents(events);
198 InspectorTest.assertEquals(8, events.length); 199 InspectorTest.assertEquals(8, events.length);
199 var eventTimes = events.map(function(e) 200 var eventTimes = events.map(function(e)
200 { 201 {
201 return e.name + ": " + e.duration + "(" + e.selfTime + ")"; 202 return e.name + ": " + e.duration + "(" + e.selfTime + ")";
202 }); 203 });
203 InspectorTest.addResult(eventTimes.join("\n")); 204 InspectorTest.addResult(eventTimes.join("\n"));
204 InspectorTest.completeTest(); 205 InspectorTest.completeTest();
205 } 206 }
206 207
207 </script> 208 </script>
208 </head> 209 </head>
209 <body onload="runTest()"> 210 <body onload="runTest()">
210 </body> 211 </body>
211 </html> 212 </html>
212 213
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/inspector/timeline/tracing/decode-resize.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698