function test()
{
WebInspector.showPanel("profiles");
- var heapProfileType = WebInspector.panels.profiles.getProfileType("HEAP");
+ var heapProfileType = WebInspector.ProfileTypeRegistry.instance.heapSnapshotProfileType;
heapProfileType.addEventListener(WebInspector.HeapSnapshotProfileType.SnapshotReceived, finishHeapSnapshot);
InspectorTest.addSniffer(heapProfileType, "_snapshotReceived", snapshotReceived);
heapProfileType._takeHeapSnapshot(function() {});
return clear("FAILED: wrong number of recorded profiles was found. profiles.length = " + profiles.length);
var profile = profiles[profiles.length - 1];
- WebInspector.panels.profiles._showProfile(profile);
+ WebInspector.panels.profiles.showProfile(profile);
}
function snapshotReceived(profile)
{
if (errorMessage)
InspectorTest.addResult(errorMessage);
- HeapProfilerAgent.clearProfiles(done);
+ setTimeout(done, 0);
WebInspector.panels.profiles._reset();
return !errorMessage;
}