rwlbuis@webkit.org | ae0934d | 2013-07-31 01:59:00 +0000 | [diff] [blame] | 1 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 | <head> |
| 3 | <script type="text/javascript"> |
| 4 | function runTest() |
| 5 | { |
| 6 | if (window.testRunner) |
| 7 | testRunner.dumpAsText(); |
| 8 | |
| 9 | var target = document.getElementById("target"); |
| 10 | |
| 11 | var a = document.createElementNS("", "a"); |
| 12 | a.setAttribute('href', '#'); |
| 13 | |
| 14 | target.appendChild(a); |
| 15 | |
| 16 | var serializer = new XMLSerializer(); |
| 17 | var xmlString = serializer.serializeToString(target); |
| 18 | |
| 19 | var outputText = document.getElementById("output"); |
| 20 | outputText.textContent = xmlString; |
| 21 | } |
| 22 | </script> |
| 23 | </head> |
| 24 | <body onload="runTest()"> |
| 25 | This tests that XMLSerializer.serializeToString() correctly writes out an empty default namespace declaration if the element is not in any namespace. |
| 26 | <div id="target"/> |
| 27 | <div id="output"/> |
| 28 | </body> |
| 29 | </html> |