diff --git a/layout/reftests/css-namespace/LICENSE b/layout/reftests/css-namespace/LICENSE
new file mode 100644
index 00000000000..9cb8c8bc48a
--- /dev/null
+++ b/layout/reftests/css-namespace/LICENSE
@@ -0,0 +1,9 @@
+W3C 3-clause BSD License
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of works must retain the original copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the original copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the W3C nor the names of its contributors may be used to endorse or promote products derived from this work without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/layout/reftests/css-namespace/README b/layout/reftests/css-namespace/README
new file mode 100644
index 00000000000..73862e45549
--- /dev/null
+++ b/layout/reftests/css-namespace/README
@@ -0,0 +1,2 @@
+This is the css3-namespace test suite. See
+http://www.w3.org/Style/CSS/Test/CSS3/Namespace/ .
diff --git a/layout/reftests/css-namespace/prefix-001.xml b/layout/reftests/css-namespace/prefix-001.xml
new file mode 100644
index 00000000000..399d2e0a209
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-001.xml
@@ -0,0 +1,19 @@
+
+
+
+
diff --git a/layout/reftests/css-namespace/prefix-002.xml b/layout/reftests/css-namespace/prefix-002.xml
new file mode 100644
index 00000000000..cbc1ffa0719
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-002.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+ CSS Namespaces Test Suite: empty string prefix (Explicit element namespace)
+
+
+
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/prefix-003.xml b/layout/reftests/css-namespace/prefix-003.xml
new file mode 100644
index 00000000000..84d07c6a618
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-003.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+ CSS Namespaces Test Suite: empty string prefix (Implied element namespace)
+
+
+ This sentence should have a green background.
+
diff --git a/layout/reftests/css-namespace/prefix-004.xml b/layout/reftests/css-namespace/prefix-004.xml
new file mode 100644
index 00000000000..6dd4925ba93
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-004.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ CSS Namespaces Test Suite: empty string default namespace
+
+
+ This sentence should have a green background.
+ This sentence should have a green background.
+
diff --git a/layout/reftests/css-namespace/prefix-005.xml b/layout/reftests/css-namespace/prefix-005.xml
new file mode 100644
index 00000000000..821720f61d3
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-005.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ CSS Namespaces Test Suite: no default namespace
+
+
+ This sentence should have a green background.
+ This sentence should have a green background.
+
diff --git a/layout/reftests/css-namespace/prefix-006.xml b/layout/reftests/css-namespace/prefix-006.xml
new file mode 100644
index 00000000000..8eace8601ad
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-006.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+ CSS Namespaces Test Suite: no prefix
+
+
+
+
+
This sentence should have a green background.
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-1-block.xml b/layout/reftests/css-namespace/ref-lime-1-block.xml
new file mode 100644
index 00000000000..22fe7684c8e
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1-block.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-1-generic.xml b/layout/reftests/css-namespace/ref-lime-1-generic.xml
new file mode 100644
index 00000000000..e71352b886a
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1-generic.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+ This sentence should have a green background.
+
diff --git a/layout/reftests/css-namespace/ref-lime-1.xml b/layout/reftests/css-namespace/ref-lime-1.xml
new file mode 100644
index 00000000000..a1d80970df2
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1.xml
@@ -0,0 +1,10 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-2-generic.xml b/layout/reftests/css-namespace/ref-lime-2-generic.xml
new file mode 100644
index 00000000000..1955745aae5
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-2-generic.xml
@@ -0,0 +1,13 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+ This sentence should have a green background.
+ This sentence should have a green background.
+
diff --git a/layout/reftests/css-namespace/ref-lime-2.xml b/layout/reftests/css-namespace/ref-lime-2.xml
new file mode 100644
index 00000000000..e577cf9c026
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-2.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+
This sentence should have a green background.
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-3.xml b/layout/reftests/css-namespace/ref-lime-3.xml
new file mode 100644
index 00000000000..9e1d9fea57f
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-3.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+
This sentence should have a green background.
+
This sentence should have a green background.
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-5.xml b/layout/reftests/css-namespace/ref-lime-5.xml
new file mode 100644
index 00000000000..9a768d57e07
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-5.xml
@@ -0,0 +1,14 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+
This sentence should have a green background.
+
This sentence should have a green background.
+
This sentence should have a green background.
+
This sentence should have a green background.
+
This sentence should have a green background.
+
+
diff --git a/layout/reftests/css-namespace/ref-lime-6.xml b/layout/reftests/css-namespace/ref-lime-6.xml
new file mode 100644
index 00000000000..410eb36dc5f
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-6.xml
@@ -0,0 +1,15 @@
+
+
+
+
+ CSS Namespaces Test Suite reference
+
+
+