auto merge of #4050 : mttr/servo/implement_attr_nodevalue, r=Ms2ger

Fixes #4047, and updates to expect tests that are now passing because of it.
This commit is contained in:
bors-servo 2014-11-20 17:18:29 -07:00
commit c23bfdf1c5
4 changed files with 23 additions and 14 deletions

View file

@ -152,6 +152,14 @@ impl<'a> AttrMethods for JSRef<'a, Attr> {
self.SetValue(value)
}
fn NodeValue(self) -> DOMString {
self.Value()
}
fn SetNodeValue(self, value: DOMString) {
self.SetValue(value)
}
fn Name(self) -> DOMString {
self.name.as_slice().to_string()
}

View file

@ -15,6 +15,7 @@ interface Attr {
readonly attribute DOMString name;
attribute DOMString value;
attribute DOMString textContent; // alias of .value
attribute DOMString nodeValue; // alias of .value
readonly attribute Element? ownerElement;

View file

@ -1165,8 +1165,8 @@
expected: FAIL
[Attr interface: attribute nodeValue]
expected: FAIL
expected: PASS
[Attr interface: document.querySelector("[id\]").attributes[0\] must inherit property "nodeValue" with the proper type (5)]
expected: FAIL
expected: PASS

View file

@ -16,38 +16,38 @@
expected: FAIL
[setAttribute should not change the order of previously set attributes.]
expected: FAIL
expected: PASS
[setAttribute should set the first attribute with the given name]
expected: FAIL
expected: PASS
[null and the empty string should result in a null namespace.]
expected: FAIL
expected: PASS
[XML-namespaced attributes don\'t need an xml prefix]
expected: FAIL
expected: PASS
[xmlns should be allowed as local name]
expected: FAIL
expected: PASS
[xmlns should be allowed as prefix in the XMLNS namespace]
expected: FAIL
expected: PASS
[xmlns should be allowed as qualified name in the XMLNS namespace]
expected: FAIL
expected: PASS
[Setting the same attribute with another prefix should not change the prefix]
expected: FAIL
expected: PASS
[Attributes should work in document fragments.]
expected: FAIL
expected: PASS
[Attribute values should not be parsed.]
expected: FAIL
expected: PASS
[Specified attributes should be accessible.]
expected: FAIL
expected: PASS
[Entities in attributes should have been expanded while parsing.]
expected: FAIL
expected: PASS