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

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

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 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
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 var source = InspectorTest.createHeapSnapshotMockRaw(); 9 var source = InspectorTest.createHeapSnapshotMockRaw();
10 var sourceStringified = JSON.stringify(source); 10 var sourceStringified = JSON.stringify(source);
11 var partSize = sourceStringified.length >> 3; 11 var partSize = sourceStringified.length >> 3;
12 12
13 function injectMockProfile(callback) { 13 function injectMockProfile(callback) {
14 var dispatcher = InspectorTest.mainTarget._dispatchers["HeapProfiler"]._ dispatchers[0]; 14 var dispatcher = InspectorTest.mainTarget._dispatcher._dispatchers["Heap Profiler"]._dispatchers[0];
15 var panel = UI.panels.heap_profiler; 15 var panel = UI.panels.heap_profiler;
16 panel._reset(); 16 panel._reset();
17 17
18 var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotPro fileType; 18 var profileType = Profiler.ProfileTypeRegistry.instance.heapSnapshotPro fileType;
19 19
20 InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapsho t", takeHeapSnapshotMock); 20 InspectorTest.override(InspectorTest.HeapProfilerAgent, "takeHeapSnapsho t", takeHeapSnapshotMock);
21 function takeHeapSnapshotMock(reportProgress, callback) { 21 function takeHeapSnapshotMock(reportProgress, callback) {
22 if (reportProgress) { 22 if (reportProgress) {
23 profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}}); 23 profileType._reportHeapSnapshotProgress({data: {done: 50, total: 100, finished: false}});
24 profileType._reportHeapSnapshotProgress({data: {done: 100, total : 100, finished: true}}); 24 profileType._reportHeapSnapshotProgress({data: {done: 100, total : 100, finished: true}});
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 </script> 134 </script>
135 </head> 135 </head>
136 136
137 <body onload="runTest()"> 137 <body onload="runTest()">
138 <p> 138 <p>
139 This test checks HeapSnapshots loader. 139 This test checks HeapSnapshots loader.
140 </p> 140 </p>
141 141
142 </body> 142 </body>
143 </html> 143 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698