OLD | NEW |
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); |
(...skipping 19 matching lines...) Expand all Loading... |
30 | 30 |
31 function tempFileReady() | 31 function tempFileReady() |
32 { | 32 { |
33 callback(this); | 33 callback(this); |
34 } | 34 } |
35 InspectorTest.addSniffer(WebInspector.HeapProfileHeader.prototype, "_did
WriteToTempFile", tempFileReady); | 35 InspectorTest.addSniffer(WebInspector.HeapProfileHeader.prototype, "_did
WriteToTempFile", tempFileReady); |
36 profileType._takeHeapSnapshot(function() {}); | 36 profileType._takeHeapSnapshot(function() {}); |
37 } | 37 } |
38 | 38 |
39 WebInspector.console.log = function(message) { | 39 WebInspector.console.log = function(message) { |
40 InspectorTest.addResult("WebInspector.consoleModel.log: " + message); | 40 InspectorTest.addResult("InspectorTest.consoleModel.log: " + message); |
41 } | 41 } |
42 | 42 |
43 InspectorTest.runTestSuite([ | 43 InspectorTest.runTestSuite([ |
44 function heapSnapshotSaveToFileTest(next) | 44 function heapSnapshotSaveToFileTest(next) |
45 { | 45 { |
46 function snapshotLoaded(profileHeader) | 46 function snapshotLoaded(profileHeader) |
47 { | 47 { |
48 var savedSnapshotData; | 48 var savedSnapshotData; |
49 function saveMock(url, data) | 49 function saveMock(url, data) |
50 { | 50 { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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> |
OLD | NEW |