test: prove hidden-tab polling in a real browser

This commit is contained in:
Said committed 2026-10-20 14:37:57 +01:00
1 parent 2c8b3593d1
commit 5b9c726f33
5 files changed
+134 -1

No files matched your search

+4
View File
@@ -275,6 +275,10 @@ const browser = await puppeteer.launch({
],
});
const page = await browser.newPage();
// This gate measures visible-page motion. OS minimization must not silently
// switch it into the app's intentional hidden-tab polling pause.
const focus = await page.createCDPSession();
await focus.send('Emulation.setFocusEmulationEnabled', { enabled: true });
boundPageEvaluations(page);
await page.setViewport({ width: 1920, height: 1080 });
const pageErrors = [];