Skip to content

Conversation

@gsnedders
Copy link
Member

@gsnedders gsnedders commented Nov 13, 2025

See https://bugs.webkit.org/show_bug.cgi?id=301239; this also adds an lcp/image-upscaling-empty-url.html to ensure we maintain coverage of whatever the underlying bug here is.

Also related: web-platform-tests/interop#1211.

@gsnedders gsnedders marked this pull request as ready for review November 13, 2025 17:55
@gsnedders gsnedders requested a review from a team as a code owner November 13, 2025 17:55
@wpt-pr-bot wpt-pr-bot requested review from npm1 and yoavweiss November 13, 2025 17:55
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we make this a variant instead of a new test to avoid duplication?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could; the downside of that is we end up changing the test ID of the corrected version, and thus lose the scoring of it historically.

@gsnedders
Copy link
Member Author

Curiously, the Firefox stability job failed, showing a bunch of flakiness: https://github.com/web-platform-tests/wpt/pull/56018/checks?check_run_id=55328993318 (https://community-tc.services.mozilla.com/tasks/Fij0zBsDTQWkZThTFGeQtQ/runs/0/logs/live/public/logs/live.log is the underlying TC logs), and showing results regressing: https://wpt.fyi/results/largest-contentful-paint/image-upscaling.html?run_id=5099988792377344&run_id=5182589603414016

This makes me wonder if we're actually seeing the opposite bug in Firefox, where loading the empty URL works but about:blank doesn't?

I wonder if this hints at another difference v. the HTML spec, and Firefox is loading an initial about:blank from the empty URL and then loading the requested about:blank?

I'm welcome to suggestions of how to make this test work in both Firefox and Safari, avoiding any differences in window.open behaviour!

See https://bugs.webkit.org/show_bug.cgi?id=301239; this also adds an
lcp/image-upscaling-empty-url.html to ensure we maintain coverage of
whatever the underlying bug here is.
@gsnedders gsnedders force-pushed the lcp-window.open-about.blank branch from 0bc355d to ad78961 Compare November 14, 2025 22:25
@gsnedders
Copy link
Member Author

I'm welcome to suggestions of how to make this test work in both Firefox and Safari, avoiding any differences in window.open behaviour!

Seemingly, waiting for either pagereveal (per spec) or pageshow (in Firefox) works to ensure the page is in a usable state.

https://wpt.fyi/results/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/load-pageshow-events-window-open.html?run_id=5136351159910400&run_id=5179304544829440&run_id=5159212767510528&run_id=5098551958044672 seems to cover this difference in Firefox behaviour, though not the fact you can interact with the initial about:blank document before it gets navigated…

@nt1m
Copy link
Member

nt1m commented Nov 17, 2025

@npm1 Can you help review this?

@yoavweiss
Copy link
Contributor

^^ @mmocny @shaseley

@shaseley
Copy link
Contributor

LGTM. @gsnedders do you think long-term the duplicate test can be removed, perhaps with a non-LCP test for whatever the window.open() issue turns out to be?

@gsnedders
Copy link
Member Author

LGTM. @gsnedders do you think long-term the duplicate test can be removed, perhaps with a non-LCP test for whatever the window.open() issue turns out to be?

Yeah, I'd hope so.

@gsnedders gsnedders requested a review from a team December 1, 2025 20:50
@gsnedders gsnedders merged commit da7949d into web-platform-tests:master Dec 3, 2025
28 checks passed
@gsnedders gsnedders deleted the lcp-window.open-about.blank branch December 3, 2025 22:47
@canova
Copy link
Member

canova commented Dec 8, 2025

Hey folks, this test perma times out in Firefox Nightly now after these changes. We recently changed how about:blank loads in Firefox in this bug. Now we load the initial about:blank synchronously in the same way other browsers do. That means the pageshow event is not web-observable anymore (the firefox case in the test).

And the pagereveal event is not supported by Firefox yet (MDN). I don't think this event should be a part of this LCP test as it is CSS view transitions related. It would be better to find a different solution for this.

I filed this bug in Bugzilla here for tracking.

canova added a commit to canova/wpt that referenced this pull request Dec 10, 2025
After the changes in web-platform-tests#56018 this test started to rely on `pagereveal`
since the way we load the page 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.
canova added a commit to canova/wpt that referenced this pull request Dec 10, 2025
After the changes in web-platform-tests#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.
canova added a commit to canova/wpt that referenced this pull request Dec 15, 2025
After the changes in web-platform-tests#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.
zcorpan pushed a commit that referenced this pull request Dec 15, 2025
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants