OLD | NEW |
1 function wrapCallFunctionForTimeline(f) | 1 function wrapCallFunctionForTimeline(f) |
2 { | 2 { |
3 var script = document.createElement("script"); | 3 var script = document.createElement("script"); |
4 script.textContent = "(" + f.toString() + ")()\n//# sourceURL=wrapCallFuncti
onForTimeline.js"; | 4 script.textContent = "(" + f.toString() + ")()\n//# sourceURL=wrapCallFuncti
onForTimeline.js"; |
5 document.body.appendChild(script); | 5 document.body.appendChild(script); |
6 } | 6 } |
7 | 7 |
8 var initialize_Timeline = function() { | 8 var initialize_Timeline = function() { |
9 | 9 |
10 InspectorTest.preloadPanel("timeline"); | 10 InspectorTest.preloadPanel("timeline"); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 tracingModel.tracingComplete(); | 127 tracingModel.tracingComplete(); |
128 var performanceModel = new Timeline.PerformanceModel(); | 128 var performanceModel = new Timeline.PerformanceModel(); |
129 performanceModel.setTracingModel(tracingModel); | 129 performanceModel.setTracingModel(tracingModel); |
130 return performanceModel; | 130 return performanceModel; |
131 } | 131 } |
132 | 132 |
133 InspectorTest.timelineController = function() | 133 InspectorTest.timelineController = function() |
134 { | 134 { |
135 var performanceModel = new Timeline.PerformanceModel(); | 135 var performanceModel = new Timeline.PerformanceModel(); |
136 UI.panels.timeline._pendingPerformanceModel = performanceModel; | 136 UI.panels.timeline._pendingPerformanceModel = performanceModel; |
137 return new Timeline.TimelineController(SDK.targetManager.mainTarget(), perfo
rmanceModel, UI.panels.timeline); | 137 return new Timeline.TimelineController(InspectorTest.tracingManager, perform
anceModel, UI.panels.timeline); |
138 } | 138 } |
139 | 139 |
140 InspectorTest.runWhenTimelineIsReady = function(callback) | 140 InspectorTest.runWhenTimelineIsReady = function(callback) |
141 { | 141 { |
142 InspectorTest.addSniffer(UI.panels.timeline, "loadingComplete", () => callba
ck()); | 142 InspectorTest.addSniffer(UI.panels.timeline, "loadingComplete", () => callba
ck()); |
143 } | 143 } |
144 | 144 |
145 InspectorTest.startTimeline = function(callback) | 145 InspectorTest.startTimeline = function(callback) |
146 { | 146 { |
147 var panel = UI.panels.timeline; | 147 var panel = UI.panels.timeline; |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 function waitForFrame() | 445 function waitForFrame() |
446 { | 446 { |
447 var callback; | 447 var callback; |
448 var promise = new Promise((fulfill) => callback = fulfill); | 448 var promise = new Promise((fulfill) => callback = fulfill); |
449 if (window.testRunner) | 449 if (window.testRunner) |
450 testRunner.capturePixelsAsyncThen(() => window.requestAnimationFrame(cal
lback)); | 450 testRunner.capturePixelsAsyncThen(() => window.requestAnimationFrame(cal
lback)); |
451 else | 451 else |
452 window.requestAnimationFrame(callback); | 452 window.requestAnimationFrame(callback); |
453 return promise; | 453 return promise; |
454 } | 454 } |
OLD | NEW |