summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html')
-rw-r--r--testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html b/testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html
new file mode 100644
index 0000000000..754fe56a96
--- /dev/null
+++ b/testing/web-platform/tests/css/css-color/color-mix-currentcolor-visited-getcomputedstyle.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>color-mix and currentcolor with :visited don't leak information via getComputedStyle</title>
+<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+
+<style>
+a:link { color: red; }
+a:visited { color: green; }
+</style>
+
+<a href=""><span id="target">This background should be green and not red</span></a>
+
+<script>
+test_computed_value("background-color", "color-mix(in srgb, currentcolor, white)", "color(srgb 1 0.5 0.5)", "should not leak :visited for computed style");
+</script>