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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-stopped-removed-race.html

Issue 2721663005: [DevTools] Access cpu profiler only when JS capability is present. (Closed)
Patch Set: rebased Created 3 years, 9 months 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 test() 7 function test()
8 { 8 {
9 InspectorTest.runProfilerTestSuite([ 9 InspectorTest.runProfilerTestSuite([
10 function testProfiling(next) 10 function testProfiling(next)
11 { 11 {
12 var cpuProfiler = SDK.targetManager.mainTarget().cpuProfilerModel; 12 var cpuProfiler = InspectorTest.cpuProfilerModel;
13 var targetManager = SDK.targetManager; 13 var targetManager = SDK.targetManager;
14 targetManager.addEventListener(SDK.TargetManager.Events.SuspendState Changed, onSuspendStateChanged); 14 targetManager.addEventListener(SDK.TargetManager.Events.SuspendState Changed, onSuspendStateChanged);
15 var profilesPanel = UI.panels.js_profiler; 15 var profilesPanel = UI.panels.js_profiler;
16 InspectorTest.addSniffer(cpuProfiler, "stopRecording", stopRecording ); 16 InspectorTest.addSniffer(cpuProfiler, "stopRecording", stopRecording );
17 InspectorTest.addSniffer(profilesPanel, "_addProfileHeader", onAddPr ofileHeader); 17 InspectorTest.addSniffer(profilesPanel, "_addProfileHeader", onAddPr ofileHeader);
18 profilesPanel.toggleRecord(); // Start profiling. 18 profilesPanel.toggleRecord(); // Start profiling.
19 19
20 function onAddProfileHeader() 20 function onAddProfileHeader()
21 { 21 {
22 profilesPanel.toggleRecord(); // Stop profiling. 22 profilesPanel.toggleRecord(); // Stop profiling.
(...skipping 27 matching lines...) Expand all
50 </script> 50 </script>
51 </head> 51 </head>
52 <body onload="runTest()"> 52 <body onload="runTest()">
53 <p> 53 <p>
54 Tests that profile removal right after stop profiling issued works. 54 Tests that profile removal right after stop profiling issued works.
55 55
56 <a href="http://crbug.com/476430">Bug 476430.</a> 56 <a href="http://crbug.com/476430">Bug 476430.</a>
57 </p> 57 </p>
58 </body> 58 </body>
59 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698