Files
sousa-gecko/testing/web-platform/tests/css/css-page/background-image-only-for-print.html
T
Helmut Januschka c86d8645c8 Bug 2054273 [wpt PR 61227] - De-flake background-image-only-for-print, a=testonly
Automatic update from web-platform-tests
De-flake background-image-only-for-print

Preload the green image before print snapshot to avoid an image load race and remove the now-unneeded Linux flaky expectation.

Bug: 342630979
Change-Id: I8611427f90c4a97e1f4169808d87d9a3b348e656
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7705607
Reviewed-by: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1660672}

--

wpt-commits: ba458f52c8a848bbd9c525ac98fb1f7b30e41dc2
wpt-pr: 61227
2026-07-13 14:38:14 +00:00

38 lines
832 B
HTML

<!DOCTYPE html>
<title>Test print result of background-image not displayed on screen</title>
<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-image">
<link rel="help" href="https://crbug.com/40262871">
<link rel="match" href="background-image-only-for-print-ref.html">
<!--
Preload the image while in screen media so it is ready when we switch
to print media for the reftest snapshot.
-->
<link rel="preload" as="image" href="/images/green.png">
<style>
@media not print {
.print-only {
display: none;
}
}
:root {
print-color-adjust: exact;
}
#target {
background-image: url("/images/green.png");
height: 50px;
width: 100px;
}
</style>
<p>
Should print a green rectangle but not display it on screen.
</p>
<div id="target" class="print-only"></div>