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

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: Created 4 years, 11 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 83 panel._captureJSProfileSetting.set(true);
caseq 2016/01/25 19:18:36 Hm... Looks like we can't do this before we fix "c
alph 2016/01/26 00:58:49 The patch addresses this issue as well.
84 panel._toggleRecording(); 84 panel._toggleRecording();
85 }; 85 };
86 86
87 InspectorTest.stopTimeline = function(callback) 87 InspectorTest.stopTimeline = function(callback)
88 { 88 {
89 var panel = WebInspector.panels.timeline; 89 var panel = WebInspector.panels.timeline;
90 function didStop() 90 function didStop()
91 { 91 {
92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this) 92 panel._model.removeEventListener(WebInspector.TimelineModel.Events.Recor dingStopped, didStop, this)
93 InspectorTest.runAfterPendingDispatches(callback); 93 InspectorTest.runAfterPendingDispatches(callback);
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 if (!--count) { 399 if (!--count) {
400 callback(); 400 callback();
401 return; 401 return;
402 } 402 }
403 if (window.testRunner) 403 if (window.testRunner)
404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame)); 404 testRunner.capturePixelsAsyncThen(requestAnimationFrame.bind(window, makeFrame));
405 else 405 else
406 window.requestAnimationFrame(makeFrame); 406 window.requestAnimationFrame(makeFrame);
407 } 407 }
408 } 408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698