Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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="profiler-test.js"></script> 4 <script src="profiler-test.js"></script>
5 <script> 5 <script>
6 6
7 function pageFunction() { 7 function pageFunction() {
8 console.profile("p1"); 8 console.profile("p1");
9 console.profileEnd("p1"); 9 console.profileEnd("p1");
10 console.profile("p1"); 10 console.profile("p1");
11 console.profileEnd("p1"); 11 console.profileEnd("p1");
12 console.profile("p2"); 12 console.profile("p2");
13 console.profileEnd("p2"); 13 console.profileEnd("p2");
14 } 14 }
15 15
16 function test() 16 function test()
17 { 17 {
18 InspectorTest.startProfilerTest(function() { 18 InspectorTest.startProfilerTest(function() {
19 function viewLoaded() { 19 function viewLoaded() {
20 var profiles = WebInspector.panels.profiles; 20 var profiles = UI.panels.profiles;
21 var type = WebInspector.ProfileTypeRegistry.instance.cpuProfileType; 21 var type = Profiler.ProfileTypeRegistry.instance.cpuProfileType;
22 while (type.getProfiles().length !== 0) 22 while (type.getProfiles().length !== 0)
23 type.removeProfile(type.getProfiles()[0]); 23 type.removeProfile(type.getProfiles()[0]);
24 InspectorTest.addResult("Profile groups after removal:"); 24 InspectorTest.addResult("Profile groups after removal:");
25 for (var key in profiles._profileGroups) 25 for (var key in profiles._profileGroups)
26 InspectorTest.addResult(key + ": " + profiles._profileGroups[key ].length); 26 InspectorTest.addResult(key + ": " + profiles._profileGroups[key ].length);
27 var section = profiles._typeIdToSidebarSection[type.id]; 27 var section = profiles._typeIdToSidebarSection[type.id];
28 InspectorTest.assertEquals(0, section.children.length, "All children has been removed"); 28 InspectorTest.assertEquals(0, section.children.length, "All children has been removed");
29 InspectorTest.completeProfilerTest(); 29 InspectorTest.completeProfilerTest();
30 } 30 }
31 InspectorTest.evaluateInPage("pageFunction()", function() {}); 31 InspectorTest.evaluateInPage("pageFunction()", function() {});
32 InspectorTest.showProfileWhenAdded("p2"); 32 InspectorTest.showProfileWhenAdded("p2");
33 InspectorTest.waitUntilProfileViewIsShown("p2", setTimeout.bind(null, vi ewLoaded, 0)); 33 InspectorTest.waitUntilProfileViewIsShown("p2", setTimeout.bind(null, vi ewLoaded, 0));
34 }); 34 });
35 } 35 }
36 36
37 </script> 37 </script>
38 </head> 38 </head>
39 <body onload="runTest()"> 39 <body onload="runTest()">
40 <p> 40 <p>
41 Tests that CPU profile removal from a group works. 41 Tests that CPU profile removal from a group works.
42 42
43 <a href="https://bugs.webkit.org/show_bug.cgi?id=110466">Bug 110466</a> 43 <a href="https://bugs.webkit.org/show_bug.cgi?id=110466">Bug 110466</a>
44 </p> 44 </p>
45 </body> 45 </body>
46 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698