wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Don't rely on the pagereveal event in lcp/image-upscaling.html

Open canova opened this issue 1 month ago • 1 comments

After the changes in #56018 this test started to rely on pagereveal since the way we load the popup has changed.

pagereveal is a new event type that's not implemented by every browsers yet and this test is for lcp rather than the CSS view transitions, so we shouldn't rely on that.

On the other hand, if a browser doesn't expose the pageshow event it means that this is a sync about:blank, so the document should be immediately ready. That's why checking popup.document.readyState is simple and effective enough.

Tested it with all major browsers and it seems like it's passing in all of them.

Once Firefox lands the synchronous about:blank changes it would be good to remove this code all together.

Fixes #56620.

canova avatar Dec 10 '25 10:12 canova

cc @gsnedders, @smfr, @shaseley could you review this one? Thanks!

canova avatar Dec 10 '25 10:12 canova

The Safari failure seems unrelated since it failed in the before case too.

Yeah, the original run ran into an infrastructure issue, hence both before/after failing. The re-run looked fine, as does the run after rebasing.

Anyhow, r+'d now.

gsnedders avatar Dec 15 '25 18:12 gsnedders