Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / setAttributeNS-empty-namespace.html
blobf7a9e98afd080bccc7bcc575ba4fdb52a577a623
1 <body>
2 <p>Test that setAttributeNS("", ...) creates an attribute in null namespace. Per DOM 3 Core,</p>
3 <pre>In programming languages where empty strings can be differentiated from null, empty strings, when given as a namespace URI, are converted to null.</pre>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 document.body.setAttributeNS("", "a", "b");
9 var attrNamespace = document.body.getAttributeNodeNS("", "a").namespaceURI;
10 document.write(attrNamespace === null ? "PASS" : ("FAIL: '" + attrNamespace + "'"));
11 </script>
12 </body>