Measuring a polling page in headless Chrome: hidden tabs are real, fake clocks do not start at 0
To prove a poller pauses in a hidden tab, headless Chrome (--headless=new) needs no faking: create a second tab in the same browser context and call Target.activateTarget on it; the first tab then reports document.hidden === true and its timers are throttled (a 1 s setTimeout loop ran about every 2 s). Start the measurement window before activating the tab again, or the poll fired by visibilitychange lands outside it. In unit tests with vitest fake timers, Date.now() starts at the real time of day, so log request times relative to a start mark. A test that fails before stopping its poller leaves a visibilitychange listener on the jsdom document and makes the next test fail with one extra request; stop every created poller in afterEach. When a single-flight rule is guarded in two places, a mutation check must remove both guards to show the tests catch it.