diff --git a/Tests/LibWeb/Text/expected/css/parse-dir-selector.txt b/Tests/LibWeb/Text/expected/css/parse-dir-selector.txt
new file mode 100644
index 00000000000..3654f6277d2
--- /dev/null
+++ b/Tests/LibWeb/Text/expected/css/parse-dir-selector.txt
@@ -0,0 +1,16 @@
+Harness status: OK
+
+Found 10 tests
+
+3 Pass
+7 Fail
+Fail ":dir(rtl)" should be a valid selector
+Fail ":dir( rtl )" should be a valid selector
+Fail ":dir(ltr):dir(rtl)" should be a valid selector
+Fail "foo:dir(RTL)" should be a valid selector
+Fail ":dir(auto)" should be a valid selector
+Fail ":dir(none)" should be a valid selector
+Fail ":dir(something-made-up)" should be a valid selector
+Pass ":dir()" should be an invalid selector
+Pass ":dir(\"ltr\")" should be an invalid selector
+Pass ":dir(ltr, rtl)" should be an invalid selector
\ No newline at end of file
diff --git a/Tests/LibWeb/Text/input/css/parse-dir-selector.html b/Tests/LibWeb/Text/input/css/parse-dir-selector.html
new file mode 100644
index 00000000000..9864cfff295
--- /dev/null
+++ b/Tests/LibWeb/Text/input/css/parse-dir-selector.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+