-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add print only background-image test
Bug: 40262871 Change-Id: I620933aaf44e717e496c9c70642aa870cdadec3a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5556416 Reviewed-by: Morten Stenshorne <[email protected]> Commit-Queue: Traian Captan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1304658}
- Loading branch information
1 parent
1cf7038
commit bbc2389
Showing
2 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<!DOCTYPE html> | ||
<p> | ||
Should print a green rectangle but not display it on screen. | ||
</p> | ||
<img src="/images/green.png" alt="A green rectangle"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!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"> | ||
|
||
<style> | ||
@media not print { | ||
.print-only { | ||
display: none; | ||
} | ||
} | ||
|
||
#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> |