Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / setAttribute-with-colon.html
blobbec069f7d2d990acce862d0a134e0c9dbaf6806e
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5 <script>
6 function debug(str) {
7 pre = document.getElementById('console');
8 text = document.createTextNode(str + '\n');
9 pre.appendChild(text);
12 function runTests() {
13 if (window.testRunner)
14 testRunner.dumpAsText();
16 elem = document.createElementNS('http://www.example.org', 'test');
17 attr = elem.setAttribute('bb:dddd', 'attr_value');
18 attrNode = elem.attributes[0];
19 debug("namespace is " + attrNode.namespaceURI);
20 debug("prefix is " + attrNode.prefix);
21 debug("localName is " + attrNode.localName);
22 if (attrNode.namespaceURI == null && attrNode.prefix == null && attrNode.localName == 'bb:dddd')
23 debug('SUCCESS')
24 else
25 debug('FAILURE')
28 </script>
29 </head>
30 <body onload="runTests();">
31 <p>This tests checks whether setAttribute allows name parameters with colons in them. If the test is successful, text below should say "SUCCESS".</p>
32 <pre id="console"></pre>
33 </body>
34 </html>