diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/pager-eager-test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/pager-eager-test.js b/tools/pager-eager-test.js index 01c8dd6..3b5c5c3 100644 --- a/tools/pager-eager-test.js +++ b/tools/pager-eager-test.js @@ -151,6 +151,12 @@ async function run(saveData, slow = false) { // the link measured now: a fast one, still a couple of seconds' worth; one slower than the clip, the cap if (!slow) check('…a fast link measured: still two seconds\' worth (half, as the second ahead)', near(head3, RATE), kb(head3)); else check('…the link measured slower than the clip: it grows to the cap (half, as the second ahead)', head3 === HEAD_MAX / 2, kb(head3)); + // the clip just left keeps its player: the swipe back is warm too + check('the clip just left keeps its player', !!(await slide('c0'))?.src); + await page.keyboard.press('ArrowUp'); + await waitFor(() => coinosPagerStarts().starts.filter((x) => /c0\.webm$/.test(x.url)).length >= 2, null, 5000); + const back = await page.evaluate(() => coinosPagerStarts().starts.filter((x) => /c0\.webm$/.test(x.url)).at(-1)); + check('…so swiping back to it starts warm', back && back.warm && back.ms < 1000, JSON.stringify(back)); } else { await sleep(3000); const s = await slide('c1'); |
