Skip to content

Commit

Permalink
Re-add SVG Image color-scheme wpt test
Browse files Browse the repository at this point in the history
external/wpt/css/css-color-adjust/rendering/dark-color-scheme/
svg-as-image.html was removed by
web-platform-tests/wpt#31407.

Re-add the test so that the preferred color scheme is also taken into
account in the reference file.

Change-Id: I0feacf73ed423c0b6ba495ea2351345b5f9590ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3255858
Commit-Queue: Alison Maher <almaher@microsoft.com>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Cr-Commit-Position: refs/heads/main@{#937385}
NOKEYCHECK=True
GitOrigin-RevId: cdca94c177661054fe5341f721589e1d310b7cd7
  • Loading branch information
alisonmaher authored and copybara-github committed Nov 2, 2021
1 parent 5dca03e commit 90fc39e
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!doctype html>
<head>
<title>prefers-color-scheme inside an SVG image</title>
<link rel="help" href="https://www.w3.org/TR/mediaqueries-5/#descdef-media-prefers-color-scheme">
</head>
<style>
div {
background-color: blue;
height: 100px;
width: 100px;
}
@media (prefers-color-scheme: dark) {
div {
background-color: green;
}
}
</style>
<p>There should be green square below when the preferred color-scheme is dark, and blue otherwise.</p>
<div></div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<!doctype html>
<head>
<title>prefers-color-scheme inside an SVG image</title>
<link rel="help" href="https://www.w3.org/TR/mediaqueries-5/#descdef-media-prefers-color-scheme">
<link rel="match" href="svg-as-image-ref.html">
</head>
<p>There should be green square below when the preferred color-scheme is dark, and blue otherwise.</p>
<img src='support/prefers-color-scheme.svg'>

0 comments on commit 90fc39e

Please sign in to comment.