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

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: Protocol -> dp 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(testRunner) {
2 let {page, session, dp} = await testRunner.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 dp.Profiler.enable();
7 var messageObject = await dp.Profiler.start();
8 if (!testRunner.expectedSuccess('startFrontendProfile', messageObject))
9 return;
10
11 messageObject = await dp.Runtime.evaluate({expression: 'console.profile("Profi le 1");'});
12 if (!testRunner.expectedSuccess('startConsoleProfile', messageObject))
13 return;
14
15 messageObject = await dp.Runtime.evaluate({expression: 'console.profileEnd("Pr ofile 1");'});
16 if (!testRunner.expectedSuccess('stopConsoleProfile', messageObject))
17 return;
18
19 messageObject = await dp.Profiler.stop();
20 if (!testRunner.expectedSuccess('stoppedFrontendProfile', messageObject))
21 return;
22
23 messageObject = await dp.Profiler.start();
24 if (!testRunner.expectedSuccess('startFrontendProfileSecondTime', messageObjec t))
25 return;
26
27 messageObject = await dp.Profiler.stop();
28 testRunner.expectedSuccess('stopFrontendProfileSecondTime', messageObject);
29 testRunner.completeTest();
30 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698