summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html')
-rw-r--r--testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html
new file mode 100644
index 0000000000..42957248b4
--- /dev/null
+++ b/testing/web-platform/tests/forced-colors-mode/forced-colors-mode-50.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Forced colors mode - accent-color.</title>
+<link rel="help" href="https://www.w3.org/TR/css-color-adjust-1/#forced-colors-properties">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<style>
+ #a, #b {
+ accent-color: green;
+ }
+ #a, #c {
+ forced-color-adjust: none;
+ }
+ #c, #d {
+ accent-color: CanvasText;
+ }
+</style>
+<input type="checkbox" id="a" checked>
+<input type="checkbox" id="b" checked>
+<input type="checkbox" id="c" checked>
+<input type="checkbox" id="d" checked>
+<script>
+ test(function(){
+ assert_equals(getComputedStyle(a).accentColor, "rgb(0, 128, 0)");
+ assert_equals(getComputedStyle(b).accentColor, "auto");
+ assert_equals(getComputedStyle(c).accentColor, getComputedStyle(d).accentColor)
+ }, "Accent-color computes to auto in forced colors mode, unless forced-color-adjust is none or accent-color is a system color.");
+</script>