Skip to content

Commit 1419aa2

Browse files
authored
Keep Responsive-Design content visibility wait live (#51)
Safari stable can overscroll the chat element in this workload, tracked in #525. When that happens, the video grid's contentvisibilityautostatechange event may never arrive.
1 parent 0f2abd2 commit 1419aa2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎experimental/tests.mjs‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,12 @@ export const ExperimentalSuites = freezeSuites([
242242
chatInput.enter("keydown");
243243
page.layout();
244244
}
245-
await cvWorkComplete;
245+
246+
// Safari can overscroll the chat element here and never send the
247+
// video grid's contentvisibilityautostatechange event. See
248+
// https://github.com/WebKit/Speedometer/issues/525. Remove this
249+
// fallback once Speedometer CI runs a Safari with that WebKit fix.
250+
await Promise.race([cvWorkComplete, new Promise((resolve) => requestAnimationFrame(() => requestAnimationFrame(resolve)))]);
246251
}),
247252
new BenchmarkTestStep("IncreaseWidthIn5Steps", async (page) => {
248253
const widths = [560, 640, 704, 768, 800];

0 commit comments

Comments
 (0)