Failure in WPT test dom/nodes/attributes.html
Categories
(Core :: DOM: Core & HTML, defect, P5)
Tracking
()
People
(Reporter: mccr8, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome, parity-safari)
There is one failure in the WPT test dom/nodes/attributes.html that does not happen in other browsers. The "First set attribute is returned with mapped attribute set first" test fails with "Failure message: assert_equals: expected "left" but got "right"". That's not very specific, so I locally reduced the failure to this (using a Mochitest-style assertion): var el = document.createElement("div") document.body.appendChild(el) el.setAttributeNS("", "align", "left") el.setAttributeNS("xx", "align", "right") el.setAttributeNS("", "foo", "left") el.setAttributeNS("xx", "foo", "right") is(el.getAttribute("align"), "left", "Test5")
Reporter | ||
Comment 1•6 years ago
|
||
I'm guessing that the idea is that the getAttribute is supposed to look at the value in the "" namespace instead of the "xx" namespace.
Comment 2•6 years ago
|
||
I vaguely recall a bug related to this, old one, but not sure what its title would be. Something about namespaces.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 3•5 years ago
|
||
(In reply to Olli Pettay [:smaug] (vacation May 27-31) from comment #2)
I vaguely recall a bug related to this, old one, but not sure what its title
would be. Something about namespaces.
Maybe you were thinking of bug 1303629?
The actual problem here has nothing to do with namespaces, but rather attribute ordering. We order attributes by mapped first then non-mapped, but per spec, getAttribute() should return the first attribute set with that name, but we don't keep information about the order in which attributes were set.
Comment 4•5 years ago
|
||
I was looking through this bug but it is still failing on https://wpt.fyi/results/dom/nodes/attributes.html?label=experimental&label=master&aligned but I see that your comment (https://bugzilla.mozilla.org/show_bug.cgi?id=1303629#c9) you thought it was fixed. Is there a bug in that implementation or is there a missing piece? SOrry if I have misunderstood
Comment 5•5 years ago
|
||
(In reply to David Burns :automatedtester from comment #4)
I was looking through this bug but it is still failing on https://wpt.fyi/results/dom/nodes/attributes.html?label=experimental&label=master&aligned but I see that your comment (https://bugzilla.mozilla.org/show_bug.cgi?id=1303629#c9) you thought it was fixed.
I think that bug may have been filed at a time when we didn't preserve any ordering for attributes? Not sure. Anyway the test case there doesn't show the behaviour that the bug is complaining about any more.
Is there a bug in that implementation or is there a missing piece? SOrry if I have misunderstood
There is a missing piece here, yes, see the second paragraph of comment 3. This WPT test is failing because of that missing piece as far as I can tell.
Updated•2 years ago
|
Description
•