Make Node::BaseURI use the document's base URL

update expectations
This commit is contained in:
mrmiywj 2016-05-14 00:54:00 +08:00
parent ea84601bf0
commit 6ade433196
3 changed files with 1 additions and 9 deletions

View file

@ -1865,7 +1865,7 @@ impl NodeMethods for Node {
// https://dom.spec.whatwg.org/#dom-node-baseuri // https://dom.spec.whatwg.org/#dom-node-baseuri
fn BaseURI(&self) -> DOMString { fn BaseURI(&self) -> DOMString {
self.owner_doc().URL() DOMString::from(self.owner_doc().base_url().as_str())
} }
// https://dom.spec.whatwg.org/#dom-node-ownerdocument // https://dom.spec.whatwg.org/#dom-node-ownerdocument

View file

@ -1,8 +1,5 @@
[document-base-url.html] [document-base-url.html]
type: testharness type: testharness
[The document base URL of a document containing one or more base elements with href attributes is the frozen base URL of the first base element in the document that has an href attribute, in tree order.]
expected: FAIL
[The fallback base URL of a document whose address is about:blank is the document base URL of the creator document.] [The fallback base URL of a document whose address is about:blank is the document base URL of the creator document.]
expected: FAIL expected: FAIL

View file

@ -1,5 +0,0 @@
[multiple-base.sub.html]
type: testharness
[If there are multiple <base> elements, the document base URL is the frozen base URL of the first one that has an href attribute]
expected: FAIL