diff --git a/Tests/LibWeb/Text/expected/css-shadow-host-selector-matching.txt b/Tests/LibWeb/Text/expected/css-shadow-host-selector-matching.txt
new file mode 100644
index 00000000000..f1f6dc14359
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/css-shadow-host-selector-matching.txt
@@ -0,0 +1,8 @@
+1. "Fast match #host selector matches: No"
+2. "Fast match .host-class selector matches: No"
+3. "Fast match div selector matches: No"
+4. "Fast match :host selector matches: Yes"
+5. "Complex match #host:not(.other) matches: No"
+6. "Complex match .host-class:where(.exists) matches: No"
+7. "Complex match div:has(span) matches: No"
+8. "Complex match :host(.host-class) matches: Yes"
diff --git a/Tests/LibWeb/Text/input/css-shadow-host-selector-matching.html b/Tests/LibWeb/Text/input/css-shadow-host-selector-matching.html
new file mode 100644
index 00000000000..18f3a99c0e4
--- /dev/null
+++ b/Tests/LibWeb/Text/input/css-shadow-host-selector-matching.html
@@ -0,0 +1,86 @@
+
+