| 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 var categories = "-*,disabled-by-default-devtools.timeline*,devtools.timelin
e," + WebInspector.TracingModel.TopLevelEventCategory; | 86 var categories = "-*,disabled-by-default-devtools.timeline*,devtools.timelin
e," + WebInspector.TracingModel.TopLevelEventCategory; |
| 87 if (additionalCategories) | 87 if (additionalCategories) |
| 88 categories += "," + additionalCategories; | 88 categories += "," + additionalCategories; |
| 89 var timelinePanel = WebInspector.panels.timeline; | 89 var timelinePanel = WebInspector.panels.timeline; |
| 90 var timelineController = InspectorTest.timelineController(); | 90 var timelineController = InspectorTest.timelineController(); |
| 91 timelinePanel._timelineController = timelineController; | 91 timelinePanel._timelineController = timelineController; |
| 92 timelineController._startRecordingWithCategories(categories, enableJSSamplin
g, tracingStarted); | 92 timelineController._startRecordingWithCategories(categories, enableJSSamplin
g, tracingStarted); |
| 93 | 93 |
| 94 function tracingStarted() | 94 function tracingStarted() |
| 95 { | 95 { |
| 96 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); | 96 InspectorTest.callFunctionInPageAsync(functionName).then(onPageActionsDo
ne); |
| 97 } | 97 } |
| 98 | 98 |
| 99 function onPageActionsDone() | 99 function onPageActionsDone() |
| 100 { | 100 { |
| 101 InspectorTest.addSniffer(WebInspector.panels.timeline, "loadingComplete"
, callback) | 101 InspectorTest.addSniffer(WebInspector.panels.timeline, "loadingComplete"
, callback) |
| 102 timelineController.stopRecording(); | 102 timelineController.stopRecording(); |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 InspectorTest.timelineModel = function() | 106 InspectorTest.timelineModel = function() |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 { | 166 { |
| 167 InspectorTest.stopTimeline(doneCallback); | 167 InspectorTest.stopTimeline(doneCallback); |
| 168 } | 168 } |
| 169 } | 169 } |
| 170 | 170 |
| 171 InspectorTest.invokeAsyncWithTimeline = function(functionName, doneCallback) | 171 InspectorTest.invokeAsyncWithTimeline = function(functionName, doneCallback) |
| 172 { | 172 { |
| 173 InspectorTest.startTimeline(step1); | 173 InspectorTest.startTimeline(step1); |
| 174 function step1() | 174 function step1() |
| 175 { | 175 { |
| 176 InspectorTest.invokePageFunctionAsync(functionName, step2); | 176 InspectorTest.callFunctionInPageAsync(functionName).then(step2); |
| 177 } | 177 } |
| 178 | 178 |
| 179 function step2() | 179 function step2() |
| 180 { | 180 { |
| 181 InspectorTest.stopTimeline(InspectorTest.safeWrap(doneCallback)); | 181 InspectorTest.stopTimeline(InspectorTest.safeWrap(doneCallback)); |
| 182 } | 182 } |
| 183 } | 183 } |
| 184 | 184 |
| 185 InspectorTest.loadTimelineRecords = function(records) | 185 InspectorTest.loadTimelineRecords = function(records) |
| 186 { | 186 { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 if (!--count) { | 470 if (!--count) { |
| 471 callback(); | 471 callback(); |
| 472 return; | 472 return; |
| 473 } | 473 } |
| 474 if (window.testRunner) | 474 if (window.testRunner) |
| 475 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); | 475 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); |
| 476 else | 476 else |
| 477 window.requestAnimationFrame(makeFrame); | 477 window.requestAnimationFrame(makeFrame); |
| 478 } | 478 } |
| 479 } | 479 } |
| OLD | NEW |