Commit 4f21b11
Don't rely on the pagereveal event in lcp/image-upscaling.html
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.1 parent cbe9409 commit 4f21b11
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments