Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / profiler / cpu-profiler-stopped-removed-race.html
blob2c5694bd0c0869417cae2733da922c3a03889868
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 test()
9 InspectorTest.runProfilerTestSuite([
10 function testProfiling(next)
12 var cpuProfiler = WebInspector.targetManager.mainTarget().cpuProfilerModel;
13 var targetManager = WebInspector.targetManager;
14 var profilesPanel = WebInspector.panels.profiles;
15 InspectorTest.addSniffer(cpuProfiler, "stopRecording", stopRecording);
16 InspectorTest.addSniffer(profilesPanel, "_addProfileHeader", onAddProfileHeader);
17 profilesPanel.toggleRecordButton(); // Start profiling.
19 function onAddProfileHeader()
21 targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, stateChanged);
22 profilesPanel.toggleRecordButton(); // Stop profiling.
23 profilesPanel._reset(); // ... and remove the profile before it actually stopped.
26 function stateChanged()
28 InspectorTest.addResult("resumed");
31 function stopRecording(resultPromise)
33 InspectorTest.addResult("Stop recording command issued.");
34 resultPromise.then(didStopRecording);
37 function didStopRecording(profile)
39 InspectorTest.addResult("Recording stopped. profile (should be null): " + profile);
40 InspectorTest.completeProfilerTest();
43 ]);
46 </script>
47 </head>
48 <body onload="runTest()">
49 <p>
50 Tests that profile removal right after stop profiling issued works.
52 <a href="http://crbug.com/476430">Bug 476430.</a>
53 </p>
54 </body>
55 </html>