diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /layout/reftests/color-scheme | |
parent | Initial commit. (diff) | |
download | firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'layout/reftests/color-scheme')
10 files changed, 73 insertions, 0 deletions
diff --git a/layout/reftests/color-scheme/color-scheme-basic-notref.html b/layout/reftests/color-scheme/color-scheme-basic-notref.html new file mode 100644 index 0000000000..93d4c8e769 --- /dev/null +++ b/layout/reftests/color-scheme/color-scheme-basic-notref.html @@ -0,0 +1,8 @@ +<!doctype html> +<style> + :root { + background-color: Window; + color: WindowText; + } +</style> +Some text diff --git a/layout/reftests/color-scheme/color-scheme-basic.html b/layout/reftests/color-scheme/color-scheme-basic.html new file mode 100644 index 0000000000..9dc0cae4e6 --- /dev/null +++ b/layout/reftests/color-scheme/color-scheme-basic.html @@ -0,0 +1,9 @@ +<!doctype html> +<style> + :root { + color-scheme: dark; + background-color: Window; + color: WindowText; + } +</style> +Some text diff --git a/layout/reftests/color-scheme/color-scheme-themed-button-notref.html b/layout/reftests/color-scheme/color-scheme-themed-button-notref.html new file mode 100644 index 0000000000..ffa300c513 --- /dev/null +++ b/layout/reftests/color-scheme/color-scheme-themed-button-notref.html @@ -0,0 +1,5 @@ +<!doctype html> +<style> + button { color: transparent; } +</style> +<button>ABC</button> diff --git a/layout/reftests/color-scheme/color-scheme-themed-button.html b/layout/reftests/color-scheme/color-scheme-themed-button.html new file mode 100644 index 0000000000..8d920e666f --- /dev/null +++ b/layout/reftests/color-scheme/color-scheme-themed-button.html @@ -0,0 +1,10 @@ +<!doctype html> +<style> + button { + color-scheme: dark; + /* We want to test the theme background rendering, not the text color which + is set via CSS. */ + color: transparent; + } +</style> +<button>ABC</button> diff --git a/layout/reftests/color-scheme/prefers-color-scheme-dark.svg b/layout/reftests/color-scheme/prefers-color-scheme-dark.svg new file mode 100644 index 0000000000..f65fce76ec --- /dev/null +++ b/layout/reftests/color-scheme/prefers-color-scheme-dark.svg @@ -0,0 +1,6 @@ +<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> + <style> + :root { color: purple } + </style> + <rect fill="currentColor" width="32" height="32"/> +</svg> diff --git a/layout/reftests/color-scheme/prefers-color-scheme-light.svg b/layout/reftests/color-scheme/prefers-color-scheme-light.svg new file mode 100644 index 0000000000..23ac2ad949 --- /dev/null +++ b/layout/reftests/color-scheme/prefers-color-scheme-light.svg @@ -0,0 +1,6 @@ +<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> + <style> + :root { color: blue } + </style> + <rect fill="currentColor" width="32" height="32"/> +</svg> diff --git a/layout/reftests/color-scheme/prefers-color-scheme-svg-image-ref.html b/layout/reftests/color-scheme/prefers-color-scheme-svg-image-ref.html new file mode 100644 index 0000000000..6551eaffae --- /dev/null +++ b/layout/reftests/color-scheme/prefers-color-scheme-svg-image-ref.html @@ -0,0 +1,7 @@ +<!doctype html> +<div style="color-scheme: light"> + <img src="prefers-color-scheme-light.svg"> +</div> +<div style="color-scheme: dark"> + <img src="prefers-color-scheme-dark.svg"> +</div> diff --git a/layout/reftests/color-scheme/prefers-color-scheme-svg-image.html b/layout/reftests/color-scheme/prefers-color-scheme-svg-image.html new file mode 100644 index 0000000000..73bb9fe06c --- /dev/null +++ b/layout/reftests/color-scheme/prefers-color-scheme-svg-image.html @@ -0,0 +1,7 @@ +<!doctype html> +<div style="color-scheme: light"> + <img src="prefers-color-scheme.svg"> +</div> +<div style="color-scheme: dark"> + <img src="prefers-color-scheme.svg"> +</div> diff --git a/layout/reftests/color-scheme/prefers-color-scheme.svg b/layout/reftests/color-scheme/prefers-color-scheme.svg new file mode 100644 index 0000000000..5523ff39fa --- /dev/null +++ b/layout/reftests/color-scheme/prefers-color-scheme.svg @@ -0,0 +1,9 @@ +<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> + <style> + :root { color: blue } + @media (prefers-color-scheme: dark) { + :root { color: purple } + } + </style> + <rect fill="currentColor" width="32" height="32"/> +</svg> diff --git a/layout/reftests/color-scheme/reftest.list b/layout/reftests/color-scheme/reftest.list new file mode 100644 index 0000000000..37dc3d7971 --- /dev/null +++ b/layout/reftests/color-scheme/reftest.list @@ -0,0 +1,6 @@ +defaults pref(layout.css.color-scheme.enabled,true) + +!= color-scheme-basic.html color-scheme-basic-notref.html +!= color-scheme-themed-button.html color-scheme-themed-button-notref.html + +== chrome://reftest/content/color-scheme/prefers-color-scheme-svg-image.html chrome://reftest/content/color-scheme/prefers-color-scheme-svg-image-ref.html |