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 handleLoad() | 7 function handleLoad() |
8 { | 8 { |
9 // Make sure there is a body wrapper. | 9 // Make sure there is a body wrapper. |
10 document.body.fieldOnDomWrapper = 2012; | 10 document.body.fieldOnDomWrapper = 2012; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 InspectorTest.addResult("PASS: more than 2 HTMLBodyElements were found")
; | 48 InspectorTest.addResult("PASS: more than 2 HTMLBodyElements were found")
; |
49 | 49 |
50 for (var i = 0; i < bodyWrapperIds.length; i++) | 50 for (var i = 0; i < bodyWrapperIds.length; i++) |
51 InspectorTest.HeapProfilerAgent.getObjectByHeapObjectId("" + bodyWra
pperIds[i], undefined, didGetObjectByHeapObjectId); | 51 InspectorTest.HeapProfilerAgent.getObjectByHeapObjectId("" + bodyWra
pperIds[i], undefined, didGetObjectByHeapObjectId); |
52 | 52 |
53 var resolvedObjectsCount = 0; | 53 var resolvedObjectsCount = 0; |
54 var remoteObjects = []; | 54 var remoteObjects = []; |
55 function didGetObjectByHeapObjectId(error, object) | 55 function didGetObjectByHeapObjectId(error, object) |
56 { | 56 { |
57 if (!error) | 57 if (!error) |
58 remoteObjects.push(WebInspector.runtimeModel.createRemoteObject(
object)); | 58 remoteObjects.push(InspectorTest.runtimeModel.createRemoteObject
(object)); |
59 | 59 |
60 if (++resolvedObjectsCount === bodyWrapperIds.length) | 60 if (++resolvedObjectsCount === bodyWrapperIds.length) |
61 requestPropertiesOfResolvedObjects(); | 61 requestPropertiesOfResolvedObjects(); |
62 } | 62 } |
63 | 63 |
64 function requestPropertiesOfResolvedObjects() | 64 function requestPropertiesOfResolvedObjects() |
65 { | 65 { |
66 if (!remoteObjects.length) | 66 if (!remoteObjects.length) |
67 return clear("FAILED: no resolved objects were detected"); | 67 return clear("FAILED: no resolved objects were detected"); |
68 | 68 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 </script> | 102 </script> |
103 </head> | 103 </head> |
104 | 104 |
105 <body onload="handleLoad()"> | 105 <body onload="handleLoad()"> |
106 <p> | 106 <p> |
107 Test that resolving heap snaphot object to a JS object will not crash on DOM wra
pper boilerplate. Test passes if it doesn't crash. | 107 Test that resolving heap snaphot object to a JS object will not crash on DOM wra
pper boilerplate. Test passes if it doesn't crash. |
108 </p> | 108 </p> |
109 | 109 |
110 </body> | 110 </body> |
111 </html> | 111 </html> |
OLD | NEW |