blob: f08d2e63874a62296ae1267eddffe29896adac24 [file] [log] [blame]
This test verifies that the setAttributeNode() API checks for existing attributes case-insensitively. Thus the value of an existing attribute with the same name but in a different case should get replaced by the new value specified via the setAttributeNode() method.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS test.getAttribute('style') is test.getAttribute('STYLE')
PASS test.getAttributeNode('style') is test.getAttributeNode('STYLE')
Verifying that attributes with the same name but different namespaces are treated as unique entities. For the following test two different attribute values should be returned.
PASS test.getAttributeNodeNS('ns1', 'newattr').value is 'newattr1'
PASS test.getAttributeNodeNS('ns2', 'newattr').value is 'newattr2'
Verifying that attributes with same name but different case and having same namespaces are treated as same. In the following test the new attribute should overwrite the value of the existing one.
PASS test.getAttributeNodeNS('ns1', 'NEWATTR').value is "newattr3"
PASS test.getAttributeNodeNS('ns1', 'newattr').value is "newattr1"
PASS successfullyParsed is true
TEST COMPLETE
Test for Bugzilla bug: 90341: createAttribute/setAttributeNode does not properly normalize case.