| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 | 83 |
| 84 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat
egories, enableJSSampling) | 84 InspectorTest.invokeWithTracing = function(functionName, callback, additionalCat
egories, enableJSSampling) |
| 85 { | 85 { |
| 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, undefined, tracingStarted); |
| 93 | 93 |
| 94 function tracingStarted() | 94 function tracingStarted() |
| 95 { | 95 { |
| 96 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); | 96 InspectorTest.invokePageFunctionAsync(functionName, onPageActionsDone); |
| 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(); |
| (...skipping 367 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 |