wpt icon indicating copy to clipboard operation
wpt copied to clipboard

lcp/image-upscaling.html timeouts in Firefox Nightly after recent change in the test

Open canova opened this issue 2 weeks ago • 1 comments

The test changes in #56018 are causing permanent timeouts in Firefox Nightly because Firefox recently changed its behavior to load about:blank synchronously. It aligns with other browsers, but this change has made the pageshow event no longer observable in the context used by this test, and it causes it to timeout.

The test tries to use pagereveal as a fallback, but:

  1. Firefox doesn't support pagereveal yet (bug 1860854).
  2. Since pagereveal is specifically for CSS view transitions, I don't think it's the right fit for testing LCP behavior.

Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2004678

It would be great to find a different approach here that works across browsers with synchronous about:blank loading.

From my testing, replacing the whole Promise.any call and promises with this code works across all browsers:

if (popup.document.readyState !== 'complete') {
 await new Promise(resolve => popup.addEventListener('pageshow', resolve, {once: true}));
}

cc @gsnedders and @smfr What do you think?

canova avatar Dec 09 '25 22:12 canova

Using pageshow seems fine.

smfr avatar Dec 10 '25 02:12 smfr

Ah, I'd tested my PR before https://bugzilla.mozilla.org/show_bug.cgi?id=543435 landed. I'll comment on the PR.

gsnedders avatar Dec 13 '25 02:12 gsnedders