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

Side by Side Diff: LayoutTests/inspector/profiler/heap-snapshot-loader.html

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 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="heap-snapshot-test.js"></script> 4 <script src="heap-snapshot-test.js"></script>
5 <script> 5 <script>
6 6
7 function test() 7 function test()
8 { 8 {
9 WebInspector.inspectorView.showPanel("profiles"); 9 WebInspector.inspectorView.showPanel("profiles");
10 var source = InspectorTest.createHeapSnapshotMockRaw(); 10 var source = InspectorTest.createHeapSnapshotMockRaw();
11 var sourceStringified = JSON.stringify(source); 11 var sourceStringified = JSON.stringify(source);
12 var partSize = sourceStringified.length >> 3; 12 var partSize = sourceStringified.length >> 3;
13 13
14 function injectMockProfile(callback) { 14 function injectMockProfile(callback) {
15 var dispatcher = InspectorBackend._connection._dispatchers["HeapProfiler "]._dispatcher; 15 var dispatcher = InspectorBackend._connection._dispatchers["HeapProfiler "]._dispatcher;
16 var panel = WebInspector.panels.profiles; 16 var panel = WebInspector.inspectorView.panel("profiles");
17 panel._reset(); 17 panel._reset();
18 18
19 var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapsho tProfileType; 19 var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapsho tProfileType;
20 20
21 InspectorTest.override(HeapProfilerAgent, "takeHeapSnapshot", takeHeapSn apshotMock); 21 InspectorTest.override(HeapProfilerAgent, "takeHeapSnapshot", takeHeapSn apshotMock);
22 function takeHeapSnapshotMock(reportProgress, callback) { 22 function takeHeapSnapshotMock(reportProgress, callback) {
23 if (reportProgress) { 23 if (reportProgress) {
24 profileType.reportHeapSnapshotProgress(50, 100, false); 24 profileType.reportHeapSnapshotProgress(50, 100, false);
25 profileType.reportHeapSnapshotProgress(100, 100, true); 25 profileType.reportHeapSnapshotProgress(100, 100, true);
26 } 26 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 } 68 }
69 InspectorTest.override(WebInspector.FileManager.prototype, "clos e", closeMock); 69 InspectorTest.override(WebInspector.FileManager.prototype, "clos e", closeMock);
70 profileHeader.saveToFile(); 70 profileHeader.saveToFile();
71 } 71 }
72 72
73 injectMockProfile(snapshotLoaded); 73 injectMockProfile(snapshotLoaded);
74 }, 74 },
75 75
76 function heapSnapshotLoadFromFileTest(next) 76 function heapSnapshotLoadFromFileTest(next)
77 { 77 {
78 var panel = WebInspector.panels.profiles; 78 var panel = WebInspector.inspectorView.panel("profiles");
79 79
80 var fileMock = { 80 var fileMock = {
81 name: "mock.heapsnapshot", 81 name: "mock.heapsnapshot",
82 size: sourceStringified.length 82 size: sourceStringified.length
83 }; 83 };
84 84
85 InspectorTest.override(WebInspector.HeapProfileHeader.prototype, '_c reateFileReader', function(fileMock, delegate) { 85 InspectorTest.override(WebInspector.HeapProfileHeader.prototype, '_c reateFileReader', function(fileMock, delegate) {
86 return { 86 return {
87 start: function(receiver) { 87 start: function(receiver) {
88 delegate.onTransferStarted(this); 88 delegate.onTransferStarted(this);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 </script> 135 </script>
136 </head> 136 </head>
137 137
138 <body onload="runTest()"> 138 <body onload="runTest()">
139 <p> 139 <p>
140 This test checks HeapSnapshots loader. 140 This test checks HeapSnapshots loader.
141 </p> 141 </p>
142 142
143 </body> 143 </body>
144 </html> 144 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698