Skip to content

Commit

Permalink
Add test fot custom timeline recording (#1994)
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Sep 28, 2023
1 parent 98f1969 commit 9c3cbbc
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 9c3cbbc

Please sign in to comment.