aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmiywj <jsyangwenjie@gmail.com>2016-05-14 00:54:00 +0800
committermrmiywj <jsyangwenjie@gmail.com>2016-05-14 14:44:06 +0800
commit6ade4331967180717e6fb87af11bbed824380abb (patch)
tree2427d9bd4f4f6ce6ffd7ca2cd3c9bae996718335
parentea84601bf08618254200b3faca055c36e9ff29b4 (diff)
downloadservo-6ade4331967180717e6fb87af11bbed824380abb.tar.gz
servo-6ade4331967180717e6fb87af11bbed824380abb.zip
Make Node::BaseURI use the document's base URL
update expectations
-rw-r--r--components/script/dom/node.rs2
-rw-r--r--tests/wpt/metadata/html/infrastructure/urls/terminology-0/document-base-url.html.ini3
-rw-r--r--tests/wpt/metadata/html/infrastructure/urls/terminology-0/multiple-base.sub.html.ini5
3 files changed, 1 insertions, 9 deletions
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 <base> elements, the document base URL is the frozen base URL of the first one that has an href attribute]
- expected: FAIL
-