mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
return null from GetNamespaceURI, not the empty string
correctly mark tests
This commit is contained in:
parent
782deca569
commit
32b7f5e136
3 changed files with 6 additions and 41 deletions
|
@ -471,8 +471,11 @@ impl Element {
|
|||
|
||||
impl<'a> ElementMethods for JSRef<'a, Element> {
|
||||
// http://dom.spec.whatwg.org/#dom-element-namespaceuri
|
||||
fn NamespaceURI(&self) -> DOMString {
|
||||
self.namespace.to_str().to_string()
|
||||
fn GetNamespaceURI(&self) -> Option<DOMString> {
|
||||
match self.namespace {
|
||||
Null => None,
|
||||
ref ns => Some(ns.to_str().to_string())
|
||||
}
|
||||
}
|
||||
|
||||
fn LocalName(&self) -> DOMString {
|
||||
|
|
|
@ -19,7 +19,7 @@ interface Element : Node {
|
|||
readonly attribute DOMString localName;
|
||||
|
||||
[Constant]
|
||||
readonly attribute DOMString namespaceURI;
|
||||
readonly attribute DOMString? namespaceURI;
|
||||
// Not [Constant] because it depends on which document we're in
|
||||
[Pure]
|
||||
readonly attribute DOMString tagName;
|
||||
|
|
|
@ -1,47 +1,12 @@
|
|||
[DOMImplementation-createDocument.html]
|
||||
type: testharness
|
||||
[createDocument test 2: null,undefined,null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 4: null,"foo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 6: null,"f1oo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 7: null,"foo1",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 11: null,"xml",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 12: null,"xmlns",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 13: null,"xmlfoo",null,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 18: undefined,undefined,undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 20: undefined,"foo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 22: undefined,"f1oo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 23: undefined,"foo1",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 27: undefined,"xml",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 28: undefined,"xmlns",undefined,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 29: undefined,"xmlfoo",undefined,null]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 41: "http://example.com/","foo:",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -78,6 +43,3 @@
|
|||
[createDocument test 106: "foo:","xmlns:foo",null,"NAMESPACE_ERR"]
|
||||
expected: FAIL
|
||||
|
||||
[createDocument test 113: null,"foo",DocumentType node,null]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue