summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-pseudo
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/css-pseudo')
-rw-r--r--testing/web-platform/tests/css/css-pseudo/chrome-first-letter-container-query-crash.html27
-rw-r--r--testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after-ref.html5
-rw-r--r--testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after.html12
-rw-r--r--testing/web-platform/tests/css/css-pseudo/selection-background-color-001.html21
4 files changed, 65 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-pseudo/chrome-first-letter-container-query-crash.html b/testing/web-platform/tests/css/css-pseudo/chrome-first-letter-container-query-crash.html
new file mode 100644
index 0000000000..6647e38731
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/chrome-first-letter-container-query-crash.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<head>
+ <title>Chrome crash issue 41492455</title>
+ <link rel="help" href="https://issues.chromium.org/issues/41492455">
+</head>
+<span id="sp"></span>
+<style>
+ head, html, body, span { display: inline-block; }
+ html::first-letter, span::first-letter {
+ color: pink;
+ }
+ span {
+ container-type: inline-size;
+ float: right;
+ }
+ body {
+ writing-mode: vertical-rl;
+ }
+</style>
+<script>
+ document.body.offsetHeight;
+ document.documentElement.style.display = "block";
+ document.head.style.display = "none";
+ document.body.style.display = "block";
+ sp.style.display = "inline";
+ document.body.offsetHeight;
+</script>
diff --git a/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after-ref.html b/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after-ref.html
new file mode 100644
index 0000000000..89bab0829a
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after-ref.html
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<title>CSS Test Reference</title>
+<p>Both 'F's below should be green.</p>
+<div><span style="color:green">F</span>irst-letter</div>
+<div><span style="color:green">F</span>irst-letter</div>
diff --git a/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after.html b/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after.html
new file mode 100644
index 0000000000..95150a0e96
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/first-letter-with-before-after.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<title>CSS Pseudo Test: ::first-letter text from ::before and ::after</title>
+<link rel="help" href="https://drafts.csswg.org/css-pseudo-4/#generated-content">
+<link rel="match" href="first-letter-with-before-after-ref.html">
+<style>
+ #t1::before { content: "F" }
+ #t2::before { content: "First-letter" }
+ div::first-letter { color: green; }
+</style>
+<p>Both 'F's below should be green.</p>
+<div id="t1">irst-letter</div>
+<div id="t2"></div>
diff --git a/testing/web-platform/tests/css/css-pseudo/selection-background-color-001.html b/testing/web-platform/tests/css/css-pseudo/selection-background-color-001.html
new file mode 100644
index 0000000000..a416d31e18
--- /dev/null
+++ b/testing/web-platform/tests/css/css-pseudo/selection-background-color-001.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>CSS Pseudo-Elements Test: ::selection background color</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-pseudo/#selectordef-selection">
+<meta name="assert" content="This test checks that ::selection background color is not modified when it matches the text color">
+<link rel="match" href="../reference/ref-filled-green-100px-square.xht">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
+<script src="support/selections.js"></script>
+<style>
+ div {
+ color: green;
+ font: 100px/1 Ahem;
+ }
+ ::selection {
+ background-color: green;
+ }
+</style>
+<p>Test passes if there is a filled green square and <strong>no red</strong>.</p>
+<div>&nbsp;</div>
+<script>selectNodeContents(document.querySelector("div"));</script> \ No newline at end of file