| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 InspectorTest.loadTimeline = function(timelineData) | 390 InspectorTest.loadTimeline = function(timelineData) |
| 391 { | 391 { |
| 392 var timeline = WebInspector.panels.timeline; | 392 var timeline = WebInspector.panels.timeline; |
| 393 | 393 |
| 394 function createFileReader(file, delegate) | 394 function createFileReader(file, delegate) |
| 395 { | 395 { |
| 396 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline
._saveToFile.bind(timeline)); | 396 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline
._saveToFile.bind(timeline)); |
| 397 } | 397 } |
| 398 | 398 |
| 399 InspectorTest.override(WebInspector.TimelineLoader, "_createFileReader", cre
ateFileReader); | 399 InspectorTest.override(WebInspector.TimelineLoader, "_createFileReader", cre
ateFileReader); |
| 400 WebInspector.TimelineLoader.loadFromFile(InspectorTest.timelineModel(), {},
new WebInspector.Progress()); | 400 timeline._loadFromFile({}); |
| 401 } | 401 } |
| 402 | 402 |
| 403 }; | 403 }; |
| 404 | 404 |
| 405 function generateFrames(count, callback) | 405 function generateFrames(count, callback) |
| 406 { | 406 { |
| 407 makeFrame(); | 407 makeFrame(); |
| 408 function makeFrame() | 408 function makeFrame() |
| 409 { | 409 { |
| 410 document.body.style.backgroundColor = count & 1 ? "rgb(200, 200, 200)" :
"rgb(240, 240, 240)"; | 410 document.body.style.backgroundColor = count & 1 ? "rgb(200, 200, 200)" :
"rgb(240, 240, 240)"; |
| 411 if (!--count) { | 411 if (!--count) { |
| 412 callback(); | 412 callback(); |
| 413 return; | 413 return; |
| 414 } | 414 } |
| 415 if (window.testRunner) | 415 if (window.testRunner) |
| 416 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); | 416 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window,
makeFrame)); |
| 417 else | 417 else |
| 418 window.requestAnimationFrame(makeFrame); | 418 window.requestAnimationFrame(makeFrame); |
| 419 } | 419 } |
| 420 } | 420 } |
| OLD | NEW |