InspectorTest.startProfilerTest(function() {
function viewLoaded(view) {
var profiles = WebInspector.panels.profiles;
- var type = profiles.getProfileType("CPU");
+ var type = WebInspector.ProfileTypeRegistry.instance.cpuProfileType;
while (type.getProfiles().length !== 0)
type.removeProfile(type.getProfiles()[0]);
InspectorTest.addResult("Profile groups after removal:");
for (var key in profiles._profileGroups)
InspectorTest.addResult(key + ": " + profiles._profileGroups[key].length);
- InspectorTest.assertEquals(0, type.treeElement.children.length, "All children has been removed");
+ var section = profiles._typeIdToSidebarSection[type.id];
+ InspectorTest.assertEquals(0, section.children.length, "All children has been removed");
InspectorTest.completeProfilerTest();
}
WebInspector.showPanel("profiles");