blob: 3a91cde3cdaad90d39a10fcc77fafe5ceacab42a [file] [log] [blame]
Tests the serialization of XML namespaces on attributes, as reported in bug 248044.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS doc.documentElement.getAttributeNS(null, "attr1") is "value1"
PASS doc.documentElement.getAttributeNS("http://www.example.com", "foo") is "bar"
PASS doc.documentElement.getAttributeNS("http://www.example.com", "foo2") is "bar2"
PASS doc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz") is "buzz"
PASS doc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz2") is "buzz2"
PASS doc.documentElement.getAttributeNS("http://www.example.com/ns2", "name") is "value"
PASS doc.documentElement.getAttributeNS("http://www.example.com/ns2", "name2") is "value2"
PASS doc.documentElement.getAttributeNS("http://www.w3.org/XML/1998/namespace", "id") is "outer"
PASS doc.querySelector("inner").localName is "inner"
PASS doc.querySelector("inner").namespaceURI is "http://www.example.com"
PASS doc.querySelector("inner").getAttributeNS(null, "id") is "inner"
PASS parsedDoc.documentElement.getAttributeNS(null, "attr1") is "value1"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com", "foo") is "bar"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com", "foo2") is "bar2"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz") is "buzz"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns1", "fizz2") is "buzz2"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name") is "value"
PASS parsedDoc.documentElement.getAttributeNS("http://www.example.com/ns2", "name2") is "value2"
PASS parsedDoc.documentElement.getAttributeNS("http://www.w3.org/XML/1998/namespace", "id") is "outer"
PASS parsedDoc.querySelector("inner").localName is "inner"
PASS parsedDoc.querySelector("inner").namespaceURI is "http://www.example.com"
PASS parsedDoc.querySelector("inner").getAttributeNS(null, "id") is "inner"
PASS successfullyParsed is true
TEST COMPLETE