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

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

Issue 268293003: DevTools: Get rid of WebInspector.panels (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 var initialize_Timeline = function() { 1 var initialize_Timeline = function() {
2 2
3 // Scrub values when printing out these properties in the record or data field. 3 // Scrub values when printing out these properties in the record or data field.
4 InspectorTest.timelinePropertyFormatters = { 4 InspectorTest.timelinePropertyFormatters = {
5 children: "formatAsTypeName", 5 children: "formatAsTypeName",
6 endTime: "formatAsTypeName", 6 endTime: "formatAsTypeName",
7 requestId: "formatAsTypeName", 7 requestId: "formatAsTypeName",
8 startTime: "formatAsTypeName", 8 startTime: "formatAsTypeName",
9 stackTrace: "formatAsTypeName", 9 stackTrace: "formatAsTypeName",
10 url: "formatAsURL", 10 url: "formatAsURL",
(...skipping 13 matching lines...) Expand all
24 identifier: "formatAsTypeName", 24 identifier: "formatAsTypeName",
25 clip: "formatAsTypeName", 25 clip: "formatAsTypeName",
26 root: "formatAsTypeName", 26 root: "formatAsTypeName",
27 backendNodeId: "formatAsTypeName", 27 backendNodeId: "formatAsTypeName",
28 networkTime: "formatAsTypeName", 28 networkTime: "formatAsTypeName",
29 thread: "formatAsTypeName" 29 thread: "formatAsTypeName"
30 }; 30 };
31 31
32 InspectorTest.timelinePresentationModel = function() 32 InspectorTest.timelinePresentationModel = function()
33 { 33 {
34 return WebInspector.panels.timeline._currentViews[0]._presentationModel; 34 return WebInspector.inspectorView.panel("timeline")._currentViews[0]._presen tationModel;
35 } 35 }
36 36
37 InspectorTest.timelineModel = function() 37 InspectorTest.timelineModel = function()
38 { 38 {
39 return WebInspector.panels.timeline._model; 39 return WebInspector.inspectorView.panel("timeline")._model;
40 } 40 }
41 41
42 InspectorTest.startTimeline = function(callback) 42 InspectorTest.startTimeline = function(callback)
43 { 43 {
44 InspectorTest._timelineRecords = []; 44 InspectorTest._timelineRecords = [];
45 WebInspector.inspectorView.panel("timeline").toggleTimelineButton.toggled = true; 45 WebInspector.inspectorView.panel("timeline").toggleTimelineButton.toggled = true;
46 WebInspector.inspectorView.panel("timeline")._model._collectionEnabled = tru e; 46 WebInspector.inspectorView.panel("timeline")._model._collectionEnabled = tru e;
47 TimelineAgent.start(5, false, undefined, true, false, callback); 47 TimelineAgent.start(5, false, undefined, true, false, callback);
48 function addRecord(record) 48 function addRecord(record)
49 { 49 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 InspectorTest.evaluateWithTimeline(actions, callback); 140 InspectorTest.evaluateWithTimeline(actions, callback);
141 }; 141 };
142 142
143 InspectorTest.printTimelineRecords = function(typeName, formatter) 143 InspectorTest.printTimelineRecords = function(typeName, formatter)
144 { 144 {
145 InspectorTest.innerPrintTimelineRecords(InspectorTest._timelineRecords, type Name, formatter); 145 InspectorTest.innerPrintTimelineRecords(InspectorTest._timelineRecords, type Name, formatter);
146 }; 146 };
147 147
148 InspectorTest.printTimelinePresentationRecords = function(typeName, formatter) 148 InspectorTest.printTimelinePresentationRecords = function(typeName, formatter)
149 { 149 {
150 InspectorTest.innerPrintTimelinePresentationRecords(WebInspector.panels.time line._model.records(), typeName, formatter); 150 InspectorTest.innerPrintTimelinePresentationRecords(WebInspector.inspectorVi ew.panel("timeline")._model.records(), typeName, formatter);
151 }; 151 };
152 152
153 InspectorTest.printTimestampRecords = function(typeName, formatter) 153 InspectorTest.printTimestampRecords = function(typeName, formatter)
154 { 154 {
155 InspectorTest.innerPrintTimelineRecords(InspectorTest.timelineModel().eventD ividerRecords(), typeName, formatter); 155 InspectorTest.innerPrintTimelineRecords(InspectorTest.timelineModel().eventD ividerRecords(), typeName, formatter);
156 }; 156 };
157 157
158 InspectorTest.innerPrintTimelineRecords = function(records, typeName, formatter) 158 InspectorTest.innerPrintTimelineRecords = function(records, typeName, formatter)
159 { 159 {
160 for (var i = 0; i < records.length; ++i) { 160 for (var i = 0; i < records.length; ++i) {
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 return this._fileSize; 318 return this._fileSize;
319 }, 319 },
320 320
321 fileName: function() 321 fileName: function()
322 { 322 {
323 return "fakeFile"; 323 return "fakeFile";
324 } 324 }
325 }; 325 };
326 326
327 }; 327 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698