commit 0e166a772ac364ad4170cf665c07b0ef74775348
parent a5f54eb14f4ea4ad0631f6663bcdbda6b8f3bb0b
Author: Simon Fraser <simon.fraser@apple.com>
Date: Mon, 10 Nov 2025 22:18:12 +0000
Bug 1995941 [wpt PR 55609] - Fix largest-contentful-paint/image-upscaling.html to use test_driver.…, a=testonly
Automatic update from web-platform-tests
Fix largest-contentful-paint/image-upscaling.html to use test_driver.bless for opening the popup
This test opens popup windows, which may be blocked by the UA. To avoid blocking,
wrap the window.open in a test_driver.bless.
Addresses https://github.com/web-platform-tests/interop/issues/1211
--
Add vendor test driver script to HTML file
--
wpt-commits: 16ec7f152b3b27ab140ccb5e5cb7537a604b910b, b3200836d6dd5e297219f25ab8048298afea3d97
wpt-pr: 55609
Diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html b/testing/web-platform/tests/largest-contentful-paint/image-upscaling.html
@@ -4,6 +4,8 @@
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
<script src="resources/largest-contentful-paint-helpers.js"></script>
<script src="/common/utils.js"></script>
<script>
@@ -12,8 +14,12 @@
const imageURL = `${window.location.origin}/images/blue.png`;
async function load_image_and_get_lcp_size(t, imageStyle = {}, containerStyle = {}) {
- const popup = window.open();
- t.add_cleanup(() => popup.close());
+ let popup;
+ await test_driver.bless('Open a popup', () => {
+ popup = window.open();
+ t.add_cleanup(() => popup.close());
+ });
+
const image = popup.document.createElement('img');
image.src = imageURL;
@@ -125,4 +131,4 @@
assert_equals(lcpSize, 100);
}, 'A scaled-down background image should report the background size');
</script>
-</body>
-\ No newline at end of file
+</body>