Skip to content

Commit 1232ab7

Browse files
committed
Update test assertions when default policy moves an attribute during Attr.value like setters
The draft spec PR now early returns in the case the element of the attribute changes rather than updating the value. See whatwg/dom#1268
1 parent d51574b commit 1232ab7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: trusted-types/set-attributes-mutations-in-callback.tentative.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -192,16 +192,16 @@
192192
case "Attr.value":
193193
case "Node.nodeValue":
194194
case "Node.textContent":
195-
// These APIs successfully sets the attribute node value, the default
196-
// policy's callback moved that node on the other element.
195+
// These APIs early return when the element changes, but the default policy's
196+
// callback still sets the attribute on the other element.
197197
returnValue = setterData.runSetter(element, testData.attrNS,
198198
testData.attrName,
199199
input_string, testData.type);
200200
assert_equals(element.attributes.length, 0);
201201
assert_equals(otherElement.attributes.length, 1);
202202
assert_equals(otherElement.getAttributeNS(testData.attrNS,
203203
testData.attrName),
204-
output_string);
204+
other_string);
205205
break;
206206
default:
207207
assert_unreached();

0 commit comments

Comments
 (0)