I don't know what the justification is for this test's expected results ("DOM L2 Core" is all that's listed), but apparently we're the only browser that fails it:
This only happens for "mapped attributes". DOM 2 Core doesn't actually define the correct behavior here.
The second attribute of setAttributeNS (or createElementNS, for that matter) is a qualified name - prefix plus local name.
DOM 3 Core backs us up on this.
Oh, I see... it's because they're using getAttribute() (DOM Level 1) with setAttributeNS() (DOM Level 2). The getAttribute() method isn't particularly well suited to work with setAttributeNS, because the latter uses namespaces, and the former doesn't.
"Calling Element.getAttribute(name) with that nodeName could then return any of those attributes. The result depends on the implementation."
Yeah, this test is bogus, imo. At least pending some sort of errata to the DOM specs defining the behavior.
So, if the conclusion is that the test is invalid, we should ask Microsoft to remove it, right?
I sent an email to my MS contact.
What this test is _actually_ testing is that a certain ordering is imposed on attributes with the same localname but different namespace URIs (at least in terms of the lookup order for getAttribute). The DOM does not guarantee such an ordering. So yes, we should ask Microsoft to remove the test.
I did send this information to Travis, and he promised to forward it to whoever
maintains that page.
It's still there... but of course that is expected. Every second of showing a faulty score to our disadvantage makes IE9 seem better.
That is unfortunate indeed, but what can we do if MS decides to put invalid
testcase to their web page, and not react too fast to comments to fix the pages.
The current DOM specification does impose some kind of ordering for what it's worth. setAttribute/setAttributeNS calls append attributes to an ordered list.