2 <html xmlns=
"http://www.w3.org/1999/xhtml">
3 <script type=
"text/javascript">
5 t = document.getElementById('console').firstChild;
11 if (window.testRunner) {
12 testRunner.dumpAsText();
15 t = document.getElementById('test');
16 attr = t.getAttributeNodeNS('http://www.example.org/', 'attr');
20 debug('Could not find attribute ');
24 if (attr.nodeName != 'test:attr') {
25 debug('attr.nodeName is ' + attr.nodeName + ', expected test:attr');
29 if (attr.namespaceURI != 'http://www.example.org/') {
30 debug('attr.namespaceURI is ' + attr.namespaceURI + ', expected http://www.example.org');
34 if (attr.prefix != 'test') {
35 debug('attr.prefix is ' + attr.prefix + ', expected test');
39 if (attr.localName != 'attr') {
40 debug('attr.localName is ' + attr.localName + ', expected attr');
45 debug('All tests succeeded!');
49 <body onload=
"runTests();">
51 This tests that attributes will have the correct namespace, prefix and local name set.
53 <div id=
"test" xmlns:
test=
"http://www.example.org/" test:
attr=
"Attribute"></div>