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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/cpu-profiler/record-cpu-profile.js

Issue 2942573003: [DevTools] New harness for inspector-protocol layout tests (Closed)
Patch Set: unified Created 3 years, 6 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
(Empty)
1 (async function() {
2 let {page, session, Protocol} = await InspectorTest.startBlank(
3 'Test that profiler is able to record a profile. ' +
4 'Also it tests that profiler returns an error when it unable to find the p rofile.');
5
6 Protocol.Profiler.enable();
7 var messageObject = await Protocol.Profiler.start();
8 if (!InspectorTest.expectedSuccess('startFrontendProfile', messageObject))
9 return;
10
11 messageObject = await Protocol.Runtime.evaluate({expression: 'console.profile( "Profile 1");'});
12 if (!InspectorTest.expectedSuccess('startConsoleProfile', messageObject))
13 return;
14
15 messageObject = await Protocol.Runtime.evaluate({expression: 'console.profileE nd("Profile 1");'});
16 if (!InspectorTest.expectedSuccess('stopConsoleProfile', messageObject))
17 return;
18
19 messageObject = await Protocol.Profiler.stop();
20 if (!InspectorTest.expectedSuccess('stoppedFrontendProfile', messageObject))
21 return;
22
23 messageObject = await Protocol.Profiler.start();
24 if (!InspectorTest.expectedSuccess('startFrontendProfileSecondTime', messageOb ject))
25 return;
26
27 messageObject = await Protocol.Profiler.stop();
28 InspectorTest.expectedSuccess('stopFrontendProfileSecondTime', messageObject);
29 InspectorTest.completeTest();
30 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698