Skip to content

Commit

Permalink
Add test fot custom timeline recording
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed Sep 28, 2023
1 parent b2e1386 commit 3ed2c92
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/commandtests/chromeTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ after.always('Stop the HTTP server', () => {

serial.beforeEach('Start the browser', async t => {
t.timeout(timeout);
engine = getEngine({ browser: 'chrome' });
engine = getEngine({
browser: 'chrome',
chrome: {
timelineRecordingType: 'custom'
}
});
return engine.start();
});

Expand Down
5 changes: 5 additions & 0 deletions test/data/commandscripts/chrome.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ module.exports = async function (context, commands) {
});
await commands.measure.start('http://127.0.0.1:3000/simple/');
await commands.cdp.send('Network.clearBrowserCookies');

await commands.chromeTrace.start();
await commands.measure.start('http://127.0.0.1:3000/dimple/');
await commands.chromeTrace.stop();

return commands.cdp.sendAndGet('Memory.getDOMCounters');
};

0 comments on commit 3ed2c92

Please sign in to comment.