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

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

Issue 27000005: Remove HeapProfiler.finishHeapSnapshot event from remote debugging protocol (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed heap profiler test Created 7 years, 2 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 InspectorTest.assertSnapshotEquals = function(reference, actual) 9 InspectorTest.assertSnapshotEquals = function(reference, actual)
10 { 10 {
(...skipping 15 matching lines...) Expand all
26 profileType.addEventListener(WebInspector.HeapSnapshotProfileType.Snapsh otReceived, snapshotLoaded, this); 26 profileType.addEventListener(WebInspector.HeapSnapshotProfileType.Snapsh otReceived, snapshotLoaded, this);
27 function snapshotLoaded(event) 27 function snapshotLoaded(event)
28 { 28 {
29 profileType.removeEventListener(WebInspector.HeapSnapshotProfileType .SnapshotReceived, snapshotLoaded, this); 29 profileType.removeEventListener(WebInspector.HeapSnapshotProfileType .SnapshotReceived, snapshotLoaded, this);
30 if (overrideGetProfile) 30 if (overrideGetProfile)
31 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", get HeapSnapshotMock); 31 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", get HeapSnapshotMock);
32 callback(event.data); 32 callback(event.data);
33 } 33 }
34 34
35 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", getHeapSnap shotMock); 35 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", getHeapSnap shotMock);
36 function getHeapSnapshotMock(uid) { 36 function getHeapSnapshotMock(uid, callback) {
37 for (var i = 0, l = sourceStringified.length; i < l; i += partSize) 37 for (var i = 0, l = sourceStringified.length; i < l; i += partSize)
38 dispatcher.addHeapSnapshotChunk(uid, sourceStringified.slice(i, i + partSize)); 38 dispatcher.addHeapSnapshotChunk(uid, sourceStringified.slice(i, i + partSize));
39 dispatcher.finishHeapSnapshot(uid); 39 callback();
40 } 40 }
41 41
42 dispatcher.addProfileHeader({ 42 dispatcher.addProfileHeader({
43 typeId: WebInspector.HeapSnapshotProfileType.TypeId, 43 typeId: WebInspector.HeapSnapshotProfileType.TypeId,
44 title: "heapSnapshotSaveToFileTest", 44 title: "heapSnapshotSaveToFileTest",
45 uid: 42, 45 uid: 42,
46 maxJSObjectId: 6 46 maxJSObjectId: 6
47 }); 47 });
48 } 48 }
49 49
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 </script> 150 </script>
151 </head> 151 </head>
152 152
153 <body onload="runTest()"> 153 <body onload="runTest()">
154 <p> 154 <p>
155 This test checks HeapSnapshots loader. 155 This test checks HeapSnapshots loader.
156 </p> 156 </p>
157 157
158 </body> 158 </body>
159 </html> 159 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698