Import the css3-namespace test suite.
authorL. David Baron <dbaron@dbaron.org>
Wed, 05 Aug 2009 17:45:49 -0700
changeset 31166 cb94c4f832a382d5637734a730a3ae8e21b12e06
parent 31165 0e1a5fe1f1e202979e1732b04f8eb9d0557b443b
child 31167 1b4982afcfa5926dd23f8310fd030884db7212b6
push idunknown
push userunknown
push dateunknown
milestone1.9.2a1pre
Import the css3-namespace test suite.
layout/reftests/css-namespace/LICENSE
layout/reftests/css-namespace/README
layout/reftests/css-namespace/prefix-001.xml
layout/reftests/css-namespace/prefix-002.xml
layout/reftests/css-namespace/prefix-003.xml
layout/reftests/css-namespace/prefix-004.xml
layout/reftests/css-namespace/prefix-005.xml
layout/reftests/css-namespace/prefix-006.xml
layout/reftests/css-namespace/ref-lime-1-block.xml
layout/reftests/css-namespace/ref-lime-1-generic.xml
layout/reftests/css-namespace/ref-lime-1.xml
layout/reftests/css-namespace/ref-lime-2-generic.xml
layout/reftests/css-namespace/ref-lime-2.xml
layout/reftests/css-namespace/ref-lime-3.xml
layout/reftests/css-namespace/ref-lime-5.xml
layout/reftests/css-namespace/ref-lime-6.xml
layout/reftests/css-namespace/reftest.list
layout/reftests/css-namespace/scope-001.xml
layout/reftests/css-namespace/scope-002.xml
layout/reftests/css-namespace/support/fail.css
layout/reftests/css-namespace/support/scope-002a.css
layout/reftests/css-namespace/support/scope-002b.css
layout/reftests/css-namespace/support/syntax-007.css
layout/reftests/css-namespace/syntax-001.xml
layout/reftests/css-namespace/syntax-002.xml
layout/reftests/css-namespace/syntax-003.xml
layout/reftests/css-namespace/syntax-004.xml
layout/reftests/css-namespace/syntax-005.xml
layout/reftests/css-namespace/syntax-006.xml
layout/reftests/css-namespace/syntax-007.xml
layout/reftests/css-namespace/syntax-008.xml
layout/reftests/css-namespace/syntax-009.xml
layout/reftests/css-namespace/syntax-010.xml
layout/reftests/css-namespace/syntax-011.xml
layout/reftests/css-namespace/syntax-012.xml
layout/reftests/css-namespace/syntax-013.xml
layout/reftests/css-namespace/syntax-014.xml
layout/reftests/css-namespace/syntax-015.xml
layout/reftests/reftest.list
new file mode 100644
--- /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.
new file mode 100644
--- /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/ .
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-001.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: prefix case-sensitivity</title>
+  <style>
+   @namespace Foo "y";
+   @namespace foo "x";
+   test { background:red }
+   Foo|test { background:lime }
+   foo|test { background:red }
+   FOO|test { background:red }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="y">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-002.xml
@@ -0,0 +1,16 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: empty string prefix (Explicit element namespace)</title>
+  <style>
+   @namespace foo "";
+   t { background:red }
+   foo|t { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="">This sentence should have a green background.</t></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-003.xml
@@ -0,0 +1,14 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: empty string prefix (Implied element namespace)</title>
+  <style>
+   @namespace foo "";
+   t { background:red }
+   foo|t { background:lime }
+  </style>
+ </head>
+ <t>This sentence should have a green background.</t>
+</root>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-004.xml
@@ -0,0 +1,17 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: empty string default namespace</title>
+  <style>
+   @namespace "";
+   @namespace x "test";
+   *|t, *|root { display:block }
+   *|t, t[x] { background:lime }
+   t { background:red }
+  </style>
+ </head>
+ <t x="">This sentence should have a green background.</t>
+ <t xmlns="test">This sentence should have a green background.</t>
+</root>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-005.xml
@@ -0,0 +1,17 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="author" title="Boris Zbarsky" href="https://bugzilla.mozilla.org/show_bug.cgi?id=458381#c4"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: no default namespace</title>
+  <style>
+   @namespace x "test";
+   root *|* { background:red; display:block }
+   head { display:none }
+   t { background: lime }
+  </style>
+ </head>
+ <t>This sentence should have a green background.</t>
+ <t xmlns="test">This sentence should have a green background.</t>
+</root>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/prefix-006.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#prefixes"/>
+  <title>CSS Namespaces Test Suite: no prefix</title>
+  <style>
+   @namespace "test";
+   |t { background:lime }
+   t { background:red }
+  </style>
+  <style>
+   @namespace "test";
+   t2 { background:lime }
+   |t2 { background:red }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="">This sentence should have a green background.</t></p>
+  <p><t2 xmlns="test">This sentence should have a green background.</t2></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1-block.xml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p style="background: lime">This sentence should have a green background.</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1-generic.xml
@@ -0,0 +1,11 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+  <style>
+   t { background:lime }
+  </style>
+ </head>
+ <t>This sentence should have a green background.</t>
+</root>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-1.xml
@@ -0,0 +1,10 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-2-generic.xml
@@ -0,0 +1,13 @@
+<root>
+ <head xmlns="http://www.w3.org/1999/xhtml">
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+  <style>
+   t, root { display:block }
+   t { background:lime }
+  </style>
+ </head>
+ <t>This sentence should have a green background.</t>
+ <t>This sentence should have a green background.</t>
+</root>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-2.xml
@@ -0,0 +1,11 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-3.xml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-5.xml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/ref-lime-6.xml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="L. David Baron" href="http://dbaron.org/"/>
+  <link rel="author" title="Mozilla Foundation" href="http://mozilla.org/"/>
+  <title>CSS Namespaces Test Suite reference</title>
+ </head>
+ <body>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+  <p><test style="background: lime">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/reftest.list
@@ -0,0 +1,23 @@
+== syntax-001.xml ref-lime-1-block.xml
+== syntax-002.xml ref-lime-1-block.xml
+== syntax-003.xml ref-lime-5.xml
+== syntax-004.xml ref-lime-1.xml
+== syntax-005.xml ref-lime-5.xml
+== syntax-006.xml ref-lime-1.xml
+== syntax-007.xml ref-lime-1.xml
+== syntax-008.xml ref-lime-2.xml
+== syntax-009.xml ref-lime-1.xml
+== syntax-010.xml ref-lime-3.xml
+== syntax-011.xml ref-lime-6.xml
+== syntax-012.xml ref-lime-3.xml
+fails == syntax-013.xml ref-lime-5.xml # bug 476856
+== syntax-014.xml ref-lime-3.xml
+== syntax-015.xml ref-lime-1.xml
+== scope-001.xml ref-lime-1.xml
+== scope-002.xml ref-lime-1.xml
+== prefix-001.xml ref-lime-1.xml
+== prefix-002.xml ref-lime-1.xml
+== prefix-003.xml ref-lime-1-generic.xml
+== prefix-004.xml ref-lime-2-generic.xml
+== prefix-005.xml ref-lime-2-generic.xml
+== prefix-006.xml ref-lime-2.xml
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/scope-001.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#scope"/>
+  <meta name="flags" content="invalid"/>
+  <title>CSS Namespaces Test Suite: scope &lt;style></title>
+  <style>
+   @namespace x url("test");
+   test { background:lime }
+  </style>
+  <style>
+   x|test { background:red }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/scope-002.xml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#scope"/>
+  <title>CSS Namespaces Test Suite: scope @import</title>
+  <style>
+   test { background:lime }
+  </style>
+  <style>
+   @import url("support/scope-002a.css");
+   @import url("support/scope-002b.css");
+   @namespace w "test";
+   x|test { background:red }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/support/fail.css
@@ -0,0 +1,1 @@
+* { background:red ! important }
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/support/scope-002a.css
@@ -0,0 +1,3 @@
+@namespace x url("test");
+@namespace y url("test");
+w|test { background:red }
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/support/scope-002b.css
@@ -0,0 +1,2 @@
+y|test { background: red }
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/support/syntax-007.css
@@ -0,0 +1,5 @@
+@charset "UTF-8";
+@namespace url("test");
+@namespace url("test2");
+*|test { background:lime }
+test { background:red }
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-001.xml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace case-insensitivity</title>
+  <style>
+   @NAmespace x "http://www.w3.org/1999/xhtml";
+   x|p { background: lime }
+  </style>
+ </head>
+ <body>
+  <p>This sentence should have a green background.</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-002.xml
@@ -0,0 +1,15 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace syntax with escapes</title>
+  <style>
+   @\N\000041 mes\pac\65  x "http://www.w3.org/1999/xhtml";
+   x|p { background: lime }
+  </style>
+ </head>
+ <body>
+  <p>This sentence should have a green background.</p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-003.xml
@@ -0,0 +1,38 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace default namespace syntax</title>
+  <style>
+   *|test { background:red }
+  </style>
+  <style>
+   @namespace url(test-a);
+   test { background:lime }
+  </style>
+  <style>
+   @namespace url('test-b');
+   test { background:lime }
+  </style>
+  <style>
+   @namespace url("test-c");
+   test { background:lime }
+  </style>
+  <style>
+   @namespace 'test-d';
+   test { background:lime }
+  </style>
+  <style>
+   @namespace "test-e";
+   test { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test-a">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-b">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-c">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-d">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-e">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-004.xml
@@ -0,0 +1,16 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace url() with escape</title>
+  <style>
+   @namespace u\00072l("test");
+   *|test { background:red }
+   test { background: lime }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-005.xml
@@ -0,0 +1,26 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace string and url() syntax</title>
+  <style>
+   test { background:red }
+  </style>
+  <style>
+   @namespace a url(test-a);
+   @namespace b url('test-b');
+   @namespace c url("test-c");
+   @namespace d 'test-d';
+   @namespace e "test-e";
+   a|test, b|test, c|test, d|test, e|test { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test-a">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-b">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-c">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-d">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-e">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-006.xml
@@ -0,0 +1,19 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <meta name="flags" content="invalid"/>
+  <title>CSS Namespaces Test Suite: invalid ordering of @namespace and @import</title>
+  <style>
+   @namespace x u\00072l("test");
+   @import url("support/fail.css");
+   @namespace url("test2");
+   x|test { background:lime }
+   test { background:red }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-007.xml
@@ -0,0 +1,12 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: @namespace and @charset</title>
+  <link rel="stylesheet" href="support/syntax-007.css"/>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-008.xml
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: escapes in prefix</title>
+  <style>
+   @namespace \72x url("test");
+   t { background:red }
+   r\78|t { background:lime }
+  </style>
+  <style>
+   @namespace \032  url("test"); // two spaces, see CSS 2.1, 4.1.3
+   t2 { background:red }
+   \32|t2 { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="test">This sentence should have a green background.</t></p>
+  <p><t2 xmlns="test">This sentence should have a green background.</t2></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-009.xml
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: escaped vertical bar in qualified name</title>
+  <style>
+   @namespace x "test";
+   test { background:red }
+   x|test { background:lime }
+   x\00007Ctest { background:red }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-010.xml
@@ -0,0 +1,34 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: duplicate @namespace declarations</title>
+  <style>
+   @namespace "1";
+   @namespace dummy "yummy";
+   @namespace "2";
+   *|t { background:lime }
+   t { background:red }
+  </style>
+  <style>
+   @namespace "1";
+   @namespace dummy "yummy";
+   @namespace "2";
+   *|t2 { background:red }
+   t2 { background:lime }
+  </style>
+  <style>
+   @namespace x "1";
+   @namespace dummy "yummy";
+   @namespace x "2";
+   *|t3 { background:red }
+   x|t3 { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="1">This sentence should have a green background.</t></p>
+  <p><t2 xmlns="2">This sentence should have a green background.</t2></p>
+  <p><t3 xmlns="2">This sentence should have a green background.</t3></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-011.xml
@@ -0,0 +1,46 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: string comparison (no URI resolving)</title>
+  <style>
+   @namespace url("http://example.com/");
+   *|t { background:lime }
+   t { background:red }
+  </style>
+  <style>
+   @namespace url("http://example.com/");
+   *|t2 { background:lime }
+   t2 { background:red }
+  </style>
+  <style>
+   @namespace url("HTTP://example.com/");
+   *|t3 { background:lime }
+   t3 { background:red }
+  </style>
+  <style>
+   @namespace url("http://example.COM/");
+   *|t4 { background:lime }
+   t4 { background:red }
+  </style>
+  <style>
+   @namespace url("%41");
+   *|t5 { background:lime }
+   t5 { background:red }
+  </style>
+  <style>
+   @namespace url("A");
+   *|t6 { background:lime }
+   t6 { background:red }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="HTTP://example.com/">This sentence should have a green background.</t></p>
+  <p><t2 xmlns="http://example.COM/">This sentence should have a green background.</t2></p>
+  <p><t3 xmlns="http://example.com/">This sentence should have a green background.</t3></p>
+  <p><t4 xmlns="http://example.com/">This sentence should have a green background.</t4></p>
+  <p><t5 xmlns="A">This sentence should have a green background.</t5></p>
+  <p><t6 xmlns="%41">This sentence should have a green background.</t6></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-012.xml
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: whitespace and comment handling</title>
+  <style>
+   test { background:red }
+  </style>
+  <style>
+   @namespace/* test */
+   a
+   url(
+test-a );
+
+   @namespace/**/b/**/url(	'test-b'
+);
+
+   @namespace	c	url("test-c"	
+);
+
+   a|test, b|test, c|test { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><test xmlns="test-a">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-b">This sentence should have a green background.</test></p>
+  <p><test xmlns="test-c">This sentence should have a green background.</test></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-013.xml
@@ -0,0 +1,43 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="author" title="Elika J. Etemad" href="http://fantasai.inkedblade.net/contact"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <meta name="flags" content="invalid"/>
+  <title>CSS Namespaces Test Suite: @namespace error handling</title>
+  <style>
+   t, t2, t3, t4, t5 { background:red }
+  </style>
+  <style>
+   @namespace "test" {}
+   t { background:lime }
+  </style>
+  <style id="a">@namespace x "test</style>
+  <script>
+   document.getElementById("a").sheet.insertRule("x|t2 {background:lime }", 1)
+  </script>
+  <style>
+   @namespace "fail;
+   ; t3 { background:lime }
+  </style>
+  <style>
+   @namespace url('fail);
+     t4 { background:red !important; }
+   );
+   t4 { background:lime }
+  </style>
+  <style>
+   @namespace url(test);
+   @namespace url('test' x);
+   t5 { background:lime }
+  </style>
+ </head>
+ <body>
+  <p><t>This sentence should have a green background.</t></p>
+  <p><t2 xmlns="test">This sentence should have a green background.</t2></p>
+  <p><t3>This sentence should have a green background.</t3></p>
+  <p><t4>This sentence should have a green background.</t4></p>
+  <p><t5 xmlns="test">This sentence should have a green background.</t5></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-014.xml
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <meta name="flags" content="invalid"/>
+  <title>CSS Namespaces Test Suite: @namespace and invalid at-rules</title>
+  <style>
+   t, t2, t3 { background:red }
+  </style>
+  <style>
+   @import x {}
+   @namespace x "test";
+   x|t { background:lime }
+  </style>
+  <style>
+   @namespace x "test-top";
+   @foobar this is funny { not:sure }
+   @namespace "test";
+   @foobar this is funner;
+   t2 { background:lime }
+   x|t3 { background:lime }
+   </style>
+ </head>
+ <body>
+  <p><t xmlns="test">This sentence should have a green background.</t></p>
+  <p><t2 xmlns="test">This sentence should have a green background.</t2></p>
+  <p><t3 xmlns="test-top">This sentence should have a green background.</t3></p>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-namespace/syntax-015.xml
@@ -0,0 +1,17 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+  <link rel="author" title="Anne van Kesteren" href="http://annevankesteren.nl/"/>
+  <link rel="author" title="Opera Software ASA" href="http://opera.com/"/>
+  <link rel="help" href="http://www.w3.org/TR/css3-namespace/#syntax"/>
+  <title>CSS Namespaces Test Suite: invalid URI</title>
+  <style>
+   @namespace x url("test");
+   @namespace x url("}x&lt; >x{");
+   t { background:lime }
+   x|t { background:red }
+  </style>
+ </head>
+ <body>
+  <p><t xmlns="test">This sentence should have a green background.</t></p>
+ </body>
+</html>
--- a/layout/reftests/reftest.list
+++ b/layout/reftests/reftest.list
@@ -42,16 +42,19 @@ include css-import/reftest.list
 include css-charset/reftest.list
 
 # css gradients
 include css-gradients/reftest.list
 
 # css media queries (tests for print mode)
 include css-mediaqueries/reftest.list
 
+# css namespaces
+include css-namespace/reftest.list
+
 # css values and units
 include css-valuesandunits/reftest.list
 
 # columns/
 include columns/reftest.list
 
 # content/
 include ../../content/test/reftest/reftest.list