Tests: Import WPT tests from css-color

Specifically, they are related to parsing the `lab()`, `lch()` and
`color(xyz-d50 ...)` color functions.
This commit is contained in:
Lucas CHOLLET 2024-11-09 11:08:54 -05:00 committed by Andreas Kling
parent 0a773b408a
commit d0dfc0c3e1
Notes: github-actions[bot] 2024-11-09 16:54:44 +00:00
3 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Specifying Lab and LCH</title>
<link rel="author" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch">
<link rel="match" href="../../../../expected/wpt-import/css/css-color/greensquare-ref.html">
<meta name="assert" content="lab() with no alpha">
<style>
.test { background-color: red; width: 12em; height: 12em; }
.test { background-color: lab(46.2775% -47.5621 48.5837); } /* green (sRGB #008000) converted to Lab */
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: Specifying Lab and LCH</title>
<link rel="author" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#specifying-lab-lch">
<link rel="match" href="../../../../expected/wpt-import/css/css-color/greensquare-ref.html">
<meta name="assert" content="lch() with no alpha">
<style>
.test { background-color: red; width: 12em; height: 12em; }
.test { background-color: lch(46.2775% 67.9892 134.3912); } /* green (sRGB #008000) converted to LCH */
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>CSS Color 4: xyz</title>
<link rel="author" title="Sam Weinig" href="mailto:weinig@apple.com">
<link rel="help" href="https://drafts.csswg.org/css-color-4/#valdef-color-xyz">
<link rel="match" href="../../../../expected/wpt-import/css/css-color/greensquare-ref.html">
<meta name="assert" content="xyz-d50 with no alpha">
<style>
.test { background-color: red; width: 12em; height: 12em; }
.test { background-color: color(xyz-d50 0.08312 0.154746 0.020961); } /* green (sRGB #008000) converted to xyz-d50 */
</style>
<body>
<p>Test passes if you see a green square, and no red.</p>
<div class="test"></div>
</body>