OLD | NEW |
1 var initialize_Timeline = function() { | 1 var initialize_Timeline = function() { |
2 | 2 |
3 InspectorTest.preloadPanel("timeline"); | 3 InspectorTest.preloadPanel("timeline"); |
4 WebInspector.TempFile = InspectorTest.TempFileMock; | 4 WebInspector.TempFile = InspectorTest.TempFileMock; |
5 | 5 |
6 // Scrub values when printing out these properties in the record or data field. | 6 // Scrub values when printing out these properties in the record or data field. |
7 InspectorTest.timelinePropertyFormatters = { | 7 InspectorTest.timelinePropertyFormatters = { |
8 children: "formatAsTypeName", | 8 children: "formatAsTypeName", |
9 endTime: "formatAsTypeName", | 9 endTime: "formatAsTypeName", |
10 requestId: "formatAsTypeName", | 10 requestId: "formatAsTypeName", |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 InspectorTest.createTimelineModelWithEvents = function(events) | 114 InspectorTest.createTimelineModelWithEvents = function(events) |
115 { | 115 { |
116 var tracingModel = new WebInspector.TracingModel(new WebInspector.TempFileBa
ckingStorage("tracing")); | 116 var tracingModel = new WebInspector.TracingModel(new WebInspector.TempFileBa
ckingStorage("tracing")); |
117 var timelineModel = new WebInspector.TimelineModel(WebInspector.TimelineUIUt
ils.visibleEventsFilter()); | 117 var timelineModel = new WebInspector.TimelineModel(WebInspector.TimelineUIUt
ils.visibleEventsFilter()); |
118 InspectorTest.setTraceEvents(timelineModel, tracingModel, events); | 118 InspectorTest.setTraceEvents(timelineModel, tracingModel, events); |
119 return timelineModel; | 119 return timelineModel; |
120 } | 120 } |
121 | 121 |
122 InspectorTest.timelineController = function() | 122 InspectorTest.timelineController = function() |
123 { | 123 { |
124 return WebInspector.panels.timeline._controller; | 124 var mainTarget = WebInspector.targetManager.mainTarget(); |
| 125 var timelinePanel = WebInspector.panels.timeline; |
| 126 return new WebInspector.TimelineController(mainTarget, timelinePanel, timeli
nePanel._tracingModel); |
125 } | 127 } |
126 | 128 |
127 InspectorTest.startTimeline = function(callback) | 129 InspectorTest.startTimeline = function(callback) |
128 { | 130 { |
129 var panel = WebInspector.panels.timeline; | 131 var panel = WebInspector.panels.timeline; |
130 InspectorTest.addSniffer(panel, "recordingStarted", callback); | 132 InspectorTest.addSniffer(panel, "recordingStarted", callback); |
131 panel._toggleRecording(); | 133 panel._toggleRecording(); |
132 }; | 134 }; |
133 | 135 |
134 InspectorTest.stopTimeline = function(callback) | 136 InspectorTest.stopTimeline = function(callback) |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 if (!--count) { | 460 if (!--count) { |
459 callback(); | 461 callback(); |
460 return; | 462 return; |
461 } | 463 } |
462 if (window.testRunner) | 464 if (window.testRunner) |
463 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); | 465 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); |
464 else | 466 else |
465 window.requestAnimationFrame(makeFrame); | 467 window.requestAnimationFrame(makeFrame); |
466 } | 468 } |
467 } | 469 } |
OLD | NEW |