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

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

Issue 1355423003: Devtools: initialize protocol enums synchronously (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: removed WebInspector._connectionForTests Created 5 years, 3 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 = InspectorBackend._connection._dispatchers["HeapProfiler "]._dispatcher; 14 var dispatcher = InspectorTest.connection._dispatchers["HeapProfiler"]._ dispatcher;
15 var panel = WebInspector.panels.profiles; 15 var panel = WebInspector.panels.profiles;
16 panel._reset(); 16 panel._reset();
17 17
18 var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapsho tProfileType; 18 var profileType = WebInspector.ProfileTypeRegistry.instance.heapSnapsho tProfileType;
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
« no previous file with comments | « LayoutTests/inspector/elements/styles-1/cached-sync-computed-styles.html ('k') | LayoutTests/inspector/report-API-errors.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698