summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html')
-rw-r--r--testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html22
1 files changed, 22 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html b/testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html
new file mode 100644
index 0000000000..67ecb8df64
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/highlight-cascade/highlight-currentcolor-root-implicit-default-ref.html
@@ -0,0 +1,22 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Reftest Reference</title>
+<p>Pass if text below is green on lime, and the text itself represents green, not initial (black).</p>
+<main>rgb(0, 128, 0)</main>
+<main>rgb(0, 128, 0)</main>
+<style>
+ main { color: green; }
+ main::selection { background-color: lime; color: green; }
+ main::highlight(foo) { background-color: lime; color: green; }
+</style>
+<script>
+ const [selection, highlight] = document.querySelectorAll("main");
+
+ let selectionRange = new Range();
+ selectionRange.selectNode(selection);
+ window.getSelection().addRange(selectionRange);
+
+ let highlightRange = new Range();
+ highlightRange.selectNode(highlight);
+ CSS.highlights.set("foo", new Highlight(highlightRange));
+</script>