Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/timeline-test.js

Issue 1752453002: Revert of Timeline: extract and rename TracingModelLoader into a file of its own (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-flame-chart-automatically-size-window.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 { 380 {
381 return this._fileSize; 381 return this._fileSize;
382 }, 382 },
383 383
384 fileName: function() 384 fileName: function()
385 { 385 {
386 return "fakeFile"; 386 return "fakeFile";
387 } 387 }
388 }; 388 };
389 389
390 InspectorTest.loadTimeline = function(timelineData)
391 {
392 var timeline = WebInspector.panels.timeline;
393
394 function createFileReader(file, delegate)
395 {
396 return new InspectorTest.FakeFileReader(timelineData, delegate, timeline ._saveToFile.bind(timeline));
397 }
398
399 InspectorTest.override(WebInspector.TimelineLoader, "_createFileReader", cre ateFileReader);
400 WebInspector.TimelineLoader.loadFromFile(InspectorTest.timelineModel(), {}, new WebInspector.Progress());
401 }
402
403 }; 390 };
404 391
405 function generateFrames(count, callback) 392 function generateFrames(count, callback)
406 { 393 {
407 makeFrame(); 394 makeFrame();
408 function makeFrame() 395 function makeFrame()
409 { 396 {
410 document.body.style.backgroundColor = count & 1 ? "rgb(200, 200, 200)" : "rgb(240, 240, 240)"; 397 document.body.style.backgroundColor = count & 1 ? "rgb(200, 200, 200)" : "rgb(240, 240, 240)";
411 if (!--count) { 398 if (!--count) {
412 callback(); 399 callback();
413 return; 400 return;
414 } 401 }
415 if (window.testRunner) 402 if (window.testRunner)
416 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame)); 403 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame));
417 else 404 else
418 window.requestAnimationFrame(makeFrame); 405 window.requestAnimationFrame(makeFrame);
419 } 406 }
420 } 407 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/timeline-flame-chart-automatically-size-window.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698