commit 62dc1aa63c76f73deeb30d0a861fac8075a6a528 parent b8e0571e297f07c3026366ee07d8d95e6e2addd5 Author: Sam Sneddon <gsnedders@apple.com> Date: Thu, 4 Dec 2025 16:56:25 +0000 Bug 2000028 [wpt PR 56018] - Change lcp/image-upscaling.html to open about:blank explicitly, a=testonly Automatic update from web-platform-tests Change lcp/image-upscaling.html to open about:blank explicitly 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. -- wpt-commits: da7949d56aa984606eafdd1720c568e8dd293227 wpt-pr: 56018 Diffstat:
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html b/testing/web-platform/tests/largest-contentful-paint/image-upscaling-empty-url.html diff --git a/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html b/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html @@ -16,10 +16,20 @@ async function load_image_and_get_lcp_size(t, imageStyle = {}, containerStyle = {}) { let popup; await test_driver.bless('Open a popup', () => { - popup = window.open(); + popup = window.open('about:blank'); t.add_cleanup(() => popup.close()); }); + // Per spec, we should end up with a pagereveal event once the + // window is open. However, Gecko seems to load the initial + // about:blank synchronously and then asynchronously load the + // about:blank requested above, thus we also accept pageshow + // here as a sign the popup is ready. + await Promise.any([ + new Promise(resolve => popup.addEventListener('pagereveal', () => resolve(), {'once': true})), + new Promise(resolve => popup.addEventListener('pageshow', () => resolve(), {'once': true})), + ]); + const image = popup.document.createElement('img'); image.src = imageURL;