Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1307,10 +1307,6 @@ test(
'core-slider--touch-tracking',
{name: 'Brightness'},
);
test.skip(
!driver.scriptedTimestamps,
'WebKit stamps an injected touch when it arrives, so a stalled dispatch bunches the throw, and its cast moves in 2 px steps (README: engine limits)',
);
await markElement(thumb);
// A compositor-only control in the same screencast: the coast is judged
// against what this machine's compositor presented in the block.
Expand All @@ -1327,27 +1323,43 @@ test(
during: fillOf(thumb),
minProgressMs: 48,
});
// A moderate iPhone flick, 900 px/s over 60 ms, with the script's own
// timestamps.
await driver.play(flick(at, {velocity: {x: 900, y: 0}, durationMs: 60}));
// A moderate iPhone flick, 900 px/s over 60 ms. WebKit stamps a touch
// when it arrives, so the play keeps the script's spacing after a
// stalled dispatch. A page that read a resting finger, or no throw,
// fails the play and names whose fault it was.
const played = await driver.play(
flick(at, {velocity: {x: 900, y: 0}, durationMs: 60}),
{pacing: 'spacing'},
);
const block = await blocking;
await page.waitForTimeout(150);
const castFrames = await cast.stop();
const tracked = await trackMarker(page, castFrames);
const control = await trackMarker(page, castFrames, {rgb: CONTROL_RGB});
// Judged until 2 px from rest: two of the cast's 1 px position steps.
// Judged until two of the cast's own steps from rest: 2 px in
// Chromium's PNG cast, 4 px in WebKit's JPEG cast. WebKit's tail then
// shows the cast's 2 px plateaus, not a stall.
const proof = busyWindowProof(tracked, block, {
axis: 'x',
settledWithin: 2,
settledWithinSteps: 2,
control,
});
// A slow runner stretches the throw, and a slow throw coasts too little
// to judge. The verdict names the release the page read, so that red
// names the runner.
const release = played.at(-1)?.release;
const summary =
release == null
? proof.summary
: `${proof.summary}; the page read ${release.pagePxPerS.toFixed(0)} px/s of the script's ${release.scriptPxPerS.toFixed(0)} px/s`;
await writeEvidence(
'busy-main-thread/slider-coast',
{
[`${testInfo.project.name}.json`]: JSON.stringify(
{
block,
proof,
release,
frames: tracked.map(f => ({
t: +(f.t - block.from).toFixed(1),
x: f.box?.x ?? null,
Expand All @@ -1372,9 +1384,9 @@ test(
await film.write(testInfo, {block, judged: proof.judged});
testInfo.annotations.push({
type: 'busy-main-thread',
description: proof.summary,
description: summary,
});
expect(proof.verdict.failures, proof.summary).toEqual([]);
expect(proof.verdict.failures, summary).toEqual([]);
},
);

Expand Down
Loading