diff --git a/css/selectors/selectors-dir-selector-change-001-ref.html b/css/selectors/selectors-dir-selector-change-001-ref.html
new file mode 100644
index 00000000000000..8c79c8328f0b2b
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-001-ref.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
The background color should be lime
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-001.html b/css/selectors/selectors-dir-selector-change-001.html
new file mode 100644
index 00000000000000..beb9b553012f77
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-001.html
@@ -0,0 +1,26 @@
+
+
+
+ CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from default(ltr) to rtl
+
+
+
+
+
+
+
+
+
+
The background color should be lime
+
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-002.html b/css/selectors/selectors-dir-selector-change-002.html
new file mode 100644
index 00000000000000..eccfde5140e272
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-002.html
@@ -0,0 +1,27 @@
+
+
+
+ CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from default(ltr) to rtl
+
+
+
+
+
+
+ Test passes if there is a filled green square and no red.
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-003-ref.html b/css/selectors/selectors-dir-selector-change-003-ref.html
new file mode 100644
index 00000000000000..8c79c8328f0b2b
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-003-ref.html
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
The background color should be lime
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-003.html b/css/selectors/selectors-dir-selector-change-003.html
new file mode 100644
index 00000000000000..5459e59132c52d
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-003.html
@@ -0,0 +1,23 @@
+
+
+
+ CSS Selectors Level 4 Test: Check for correctly updating :dir matching on dir attribute change from rtl to auto
+
+
+
+
+
+
+
+
+
+
The background color should be lime
+
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-004-ref.html b/css/selectors/selectors-dir-selector-change-004-ref.html
new file mode 100644
index 00000000000000..9a130cb2e5c71b
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-004-ref.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-change-004.html b/css/selectors/selectors-dir-selector-change-004.html
new file mode 100644
index 00000000000000..e5040f63f5b3ce
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-change-004.html
@@ -0,0 +1,24 @@
+
+
+
+ CSS Selectors Level 4 Test: Check for correctly updating :dir matching on directionality change from ltr to rtl
+
+
+
+
+
+
+
+
+
+
+
The background color should be lime
+
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-ltr-002.html b/css/selectors/selectors-dir-selector-ltr-002.html
new file mode 100644
index 00000000000000..bbb3f26a780b13
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-ltr-002.html
@@ -0,0 +1,26 @@
+
+
+
+ CSS Selectors Level 4 Test: exception handling for an invalid identifier of dir()
+
+
+
+
+
+
+
+
+ Test passes if there is a filled green square and no red.
+
+
+
diff --git a/css/selectors/selectors-dir-selector-ltr-003.html b/css/selectors/selectors-dir-selector-ltr-003.html
new file mode 100644
index 00000000000000..821a33616fca69
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-ltr-003.html
@@ -0,0 +1,26 @@
+
+
+
+ CSS Selectors Level 4 Test: exception handling for multiple identifiers of dir()
+
+
+
+
+
+
+
+
+ Test passes if there is a filled green square and no red.
+
+
+
diff --git a/css/selectors/selectors-dir-selector-white-space-001-ref.html b/css/selectors/selectors-dir-selector-white-space-001-ref.html
new file mode 100644
index 00000000000000..955a2dd603d625
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-white-space-001-ref.html
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ Test passes if there is a filled green square and no red.
+
+
+
+
+
diff --git a/css/selectors/selectors-dir-selector-white-space-001.html b/css/selectors/selectors-dir-selector-white-space-001.html
new file mode 100644
index 00000000000000..d3128a03734dc9
--- /dev/null
+++ b/css/selectors/selectors-dir-selector-white-space-001.html
@@ -0,0 +1,27 @@
+
+
+
+ CSS Selectors Level 4 Test: Verify for an identifier with leading and tailing whitespace of dir()
+
+
+
+
+
+
+
+ Test passes if there is a filled green square and no red.
+
+
+
+
+