| OLD | NEW |
| 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" | 1 <!DOCTYPE html> |
| 2 "http://www.w3.org/TR/html4/loose.dtd"> | 2 <script src="../../resources/js-test.js"></script> |
| 3 <html> | 3 |
| 4 <head> | |
| 5 <script> | 4 <script> |
| 6 function debug(str) { | 5 description("Test that setAttributeNS with a null namespaceURI actually sets it
to the value null and not a string with the contents 'null'."); |
| 7 pre = document.getElementById('console'); | |
| 8 text = document.createTextNode(str + '\n'); | |
| 9 pre.appendChild(text); | |
| 10 } | |
| 11 | 6 |
| 12 function runTests() { | 7 window.elem = document.createElementNS('http://www.example.org', 'test'); |
| 13 if (window.testRunner) | 8 elem.setAttributeNS(null, 'name', 'value'); |
| 14 testRunner.dumpAsText(); | 9 shouldBeNull('elem.attributes[0].namespaceURI'); |
| 15 | |
| 16 elem = document.createElementNS('http://www.example.org', 'test') | |
| 17 attr = elem.setAttributeNS(null, 'name', 'value') | |
| 18 | |
| 19 if (elem.attributes[0].namespaceURI == null) | |
| 20 debug('SUCCESS') | |
| 21 else | |
| 22 debug('FAILURE') | |
| 23 } | |
| 24 | |
| 25 </script> | 10 </script> |
| 26 </head> | |
| 27 <body onload="runTests();"> | |
| 28 This tests that setAttributeNS with a null namespaceURI actually sets it to the
value null and not a string with the contents 'null'. If the test is sucessful,
the text below should say "SUCCESS". | |
| 29 <pre id="console"> | |
| 30 </pre> | |
| 31 </body> | |
| 32 </html> | |
| OLD | NEW |