From 6ade4331967180717e6fb87af11bbed824380abb Mon Sep 17 00:00:00 2001 From: mrmiywj Date: Sat, 14 May 2016 00:54:00 +0800 Subject: [PATCH] Make Node::BaseURI use the document's base URL update expectations --- components/script/dom/node.rs | 2 +- .../urls/terminology-0/document-base-url.html.ini | 3 --- .../urls/terminology-0/multiple-base.sub.html.ini | 5 ----- 3 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index d9d9343680d..21b79bd8e2f 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 7f5fa8cfda6..0fa40f12b6d 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 f0c1b5ee9ac..00000000000 --- 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 -