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

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

Issue 1624783002: DevTools: Switch to using fast stack iterator to collect stacks during timeline recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 4 landing Created 4 years, 10 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 InspectorTest.timelineFrameModel = function() 69 InspectorTest.timelineFrameModel = function()
70 { 70 {
71 return WebInspector.panels.timeline._frameModel; 71 return WebInspector.panels.timeline._frameModel;
72 } 72 }
73 73
74 InspectorTest.startTimeline = function(callback) 74 InspectorTest.startTimeline = function(callback)
75 { 75 {
76 var panel = WebInspector.panels.timeline; 76 var panel = WebInspector.panels.timeline;
77 function onRecordingStarted() 77 function onRecordingStarted()
78 { 78 {
79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStarted, onRecordingStarted, this) 79 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStarted, onRecordingStarted, this);
80 callback(); 80 callback();
81 } 81 }
82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta rted, onRecordingStarted, this) 82 panel._model.addEventListener(WebInspector.TimelineModel.Events.RecordingSta rted, onRecordingStarted, this);
83 panel._captureJSProfileSetting.set(false);
84 panel._toggleRecording(); 83 panel._toggleRecording();
85 }; 84 };
86 85
87 InspectorTest.stopTimeline = function(callback) 86 InspectorTest.stopTimeline = function(callback)
88 { 87 {
89 var panel = WebInspector.panels.timeline; 88 var panel = WebInspector.panels.timeline;
90 function didStop() 89 function didStop()
91 { 90 {
92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this) 91 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this)
93 InspectorTest.runAfterPendingDispatches(callback); 92 InspectorTest.runAfterPendingDispatches(callback);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 if (!--count) { 398 if (!--count) {
400 callback(); 399 callback();
401 return; 400 return;
402 } 401 }
403 if (window.testRunner) 402 if (window.testRunner)
404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame)); 403 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame));
405 else 404 else
406 window.requestAnimationFrame(makeFrame); 405 window.requestAnimationFrame(makeFrame);
407 } 406 }
408 } 407 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698