Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / profiler / cpu-profiler-profile-removal.html
blob9c8971962aef40dd9eab62ada47e151d4614a211
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="profiler-test.js"></script>
5 <script>
7 function pageFunction() {
8 console.profile("p1");
9 console.profileEnd("p1");
10 console.profile("p1");
11 console.profileEnd("p1");
12 console.profile("p2");
13 console.profileEnd("p2");
16 function test()
18 InspectorTest.startProfilerTest(function() {
19 function viewLoaded() {
20 var profiles = WebInspector.panels.profiles;
21 var type = WebInspector.ProfileTypeRegistry.instance.cpuProfileType;
22 while (type.getProfiles().length !== 0)
23 type.removeProfile(type.getProfiles()[0]);
24 InspectorTest.addResult("Profile groups after removal:");
25 for (var key in profiles._profileGroups)
26 InspectorTest.addResult(key + ": " + profiles._profileGroups[key].length);
27 var section = profiles._typeIdToSidebarSection[type.id];
28 InspectorTest.assertEquals(0, section.children.length, "All children has been removed");
29 InspectorTest.completeProfilerTest();
31 InspectorTest.evaluateInPage("pageFunction()", function() {});
32 InspectorTest.showProfileWhenAdded("p2");
33 InspectorTest.waitUntilProfileViewIsShown("p2", setTimeout.bind(null, viewLoaded, 0));
34 });
37 </script>
38 </head>
39 <body onload="runTest()">
40 <p>
41 Tests that CPU profile removal from a group works.
43 <a href="https://bugs.webkit.org/show_bug.cgi?id=110466">Bug 110466</a>
44 </p>
45 </body>
46 </html>