2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / importNode-prefix.html
blob2d1a780ce75533c2fb3b95254f7840ad3b61906a
1 <html>
2 <head>
3 <script>
4 function debug(str) {
5 pre = document.getElementById('console');
6 txt = document.createTextNode(str + '\n')
7 pre.appendChild(txt)
9 function runTests() {
10 if (window.layoutTestController)
11 layoutTestController.dumpAsText()
13 var elem = document.createElementNS('http://www.example.org', 'test:p')
14 var importedNode = document.importNode(elem, true)
16 if (importedNode.prefix != 'test') {
17 debug('FAILURE: imported node has wrong prefix')
18 return
21 debug('SUCCESS!')
24 </script>
25 </head>
26 <body onload="runTests();">
27 This tests that an element which is cloned by using importNode keeps its prefix. If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
28 <pre id="console">
29 </pre>
30 </body>
31 </html>