mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
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:
parent
0a773b408a
commit
d0dfc0c3e1
Notes:
github-actions[bot]
2024-11-09 16:54:44 +00:00
Author: https://github.com/LucasChollet Commit: https://github.com/LadybirdBrowser/ladybird/commit/d0dfc0c3e1b Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2252
3 changed files with 45 additions and 0 deletions
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/lab-001.html
Normal file
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/lab-001.html
Normal 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>
|
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/lch-001.html
Normal file
15
Tests/LibWeb/Ref/input/wpt-import/css/css-color/lch-001.html
Normal 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>
|
|
@ -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>
|
Loading…
Reference in a new issue