summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html')
-rw-r--r--testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html b/testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html
new file mode 100644
index 0000000000..57078cf83b
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/selection-over-highlight-001.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Pseudo-Elements Test: selected highlight highlight painting</title>
+<link rel="author" name="Stephen Chenney" href="mailto:schenney@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#highlight-painting">
+<meta name="assert" value="Checks that the highlight colors persist when selected.">
+<link rel="match" href="selection-over-highlight-001-ref.html">
+<style>
+ ::selection {
+ background-color: lightblue;
+ }
+ ::highlight(green) {
+ color: green;
+ }
+</style>
+<div id="content">When selected, the highlight color should remain.</div>
+<script>
+ let range = new Range();
+ range.setStart(content, 0);
+ range.setEnd(content, 1);
+ CSS.highlights.set("green", new Highlight(range));
+
+ document.execCommand("selectAll");
+</script>