diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index d9d9343680df..21b79bd8e2fe 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -1865,7 +1865,7 @@ impl NodeMethods for Node { // https://dom.spec.whatwg.org/#dom-node-baseuri 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 diff --git a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini index 7f5fa8cfda61..0fa40f12b6d6 100644 --- a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini +++ b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini @@ -1,8 +1,5 @@ [document-base-url.html] 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.] expected: FAIL diff --git a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini b/tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini deleted file mode 100644 index f0c1b5ee9ac9..000000000000 --- a/tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[multiple-base.sub.html] - type: testharness - [If there are multiple elements, the document base URL is the frozen base URL of the first one that has an href attribute] - expected: FAIL -