diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html')
-rw-r--r-- | testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html b/testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html new file mode 100644 index 0000000000..15556737c7 --- /dev/null +++ b/testing/web-platform/tests/css/css-color/color-mix-non-srgb-001-ref.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<link rel="author" href="mailto:barret@brennie.ca" title="Barret Rennie"> +<link rel="author" href="https://mozilla.org" title="Mozilla"> +<style> +div { color: black; } +.test { background-color: black; width: 14em; height: 1em; margin-top: 0; margin-bottom: 0; } +</style> +<body> +<script> +const TEST_CASES = [ + ["red", "green", "xyz", "rgb(188, 92, 0)"], + ["red", "green", "lab", "rgb(161, 108, 0)"], + ["red", "green", "lch", "rgb(145, 116, 0)"], + ["red", "green 90%", "xyz", "rgb(89, 122, 0)"], + ["red", "green 90%", "lab", "rgb(65, 126, 0)"], + ["red", "green 90%", "lch", "rgb(49, 128, 0)"], + ["red 90%", "green", "xyz", "rgb(243, 40, 0)"], + ["red 90%", "green", "lab", "rgb(237, 55, 0)"], + ["red 90%", "green", "lch", "rgb(235, 59, 0)"], +]; + +for (let [from, to, space, expected] of TEST_CASES) { + const value = expected + const element = document.createElement("div") + element.classList.add('test') + element.style.backgroundColor = value; + document.body.appendChild(element) +} +</script> +</body> |