diff --git a/components/script/dom/location.rs b/components/script/dom/location.rs index 3bde73d6f73..1d9f291c057 100644 --- a/components/script/dom/location.rs +++ b/components/script/dom/location.rs @@ -42,16 +42,46 @@ impl<'a> LocationMethods for &'a Location { self.window.root().r().load_url(url); } + // https://url.spec.whatwg.org/#dom-urlutils-hash + fn Hash(self) -> USVString { + UrlHelper::Hash(&self.get_url()) + } + // https://url.spec.whatwg.org/#dom-urlutils-href fn Href(self) -> USVString { UrlHelper::Href(&self.get_url()) } + // https://url.spec.whatwg.org/#dom-urlutils-host + fn Host(self) -> USVString { + UrlHelper::Host(&self.get_url()) + } + + // https://url.spec.whatwg.org/#dom-urlutils-hostname + fn Hostname(self) -> USVString { + UrlHelper::Hostname(&self.get_url()) + } + + // https://url.spec.whatwg.org/#dom-urlutils-password + fn Password(self) -> USVString { + UrlHelper::Password(&self.get_url()) + } + // https://url.spec.whatwg.org/#dom-urlutils-pathname fn Pathname(self) -> USVString { UrlHelper::Pathname(&self.get_url()) } + // https://url.spec.whatwg.org/#dom-urlutils-port + fn Port(self) -> USVString { + UrlHelper::Port(&self.get_url()) + } + + // https://url.spec.whatwg.org/#dom-urlutils-protocol + fn Protocol(self) -> USVString { + UrlHelper::Protocol(&self.get_url()) + } + // https://url.spec.whatwg.org/#URLUtils-stringification-behavior fn Stringifier(self) -> DOMString { self.Href().0 @@ -62,9 +92,9 @@ impl<'a> LocationMethods for &'a Location { UrlHelper::Search(&self.get_url()) } - // https://url.spec.whatwg.org/#dom-urlutils-hash - fn Hash(self) -> USVString { - UrlHelper::Hash(&self.get_url()) + // https://url.spec.whatwg.org/#dom-urlutils-username + fn Username(self) -> USVString { + UrlHelper::Username(&self.get_url()) } } diff --git a/components/script/dom/mod.rs b/components/script/dom/mod.rs index 8aef70f6368..466aced53d7 100644 --- a/components/script/dom/mod.rs +++ b/components/script/dom/mod.rs @@ -308,6 +308,7 @@ pub mod textdecoder; pub mod textencoder; pub mod treewalker; pub mod uievent; +pub mod url; pub mod urlhelper; pub mod urlsearchparams; pub mod userscripts; diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs new file mode 100644 index 00000000000..8b94b88b26b --- /dev/null +++ b/components/script/dom/url.rs @@ -0,0 +1,150 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +use dom::bindings::codegen::Bindings::URLBinding::{self, URLMethods}; +use dom::bindings::error::{Error, Fallible}; +use dom::bindings::global::GlobalRef; +use dom::bindings::js::Root; +use dom::bindings::utils::{Reflector, reflect_dom_object}; +use dom::bindings::str::USVString; +use dom::urlhelper::UrlHelper; + +use url::{Host, Url, UrlParser}; +use util::str::DOMString; + +use std::borrow::ToOwned; + +// https://url.spec.whatwg.org/#url +#[dom_struct] +pub struct URL { + reflector_: Reflector, + + // https://url.spec.whatwg.org/#concept-urlutils-url + url: Url, +} + +impl URL { + fn new_inherited(url: Url) -> URL { + URL { + reflector_: Reflector::new(), + url: url, + } + } + + pub fn new(global: GlobalRef, url: Url) -> Root { + reflect_dom_object(box URL::new_inherited(url), + global, URLBinding::Wrap) + } +} + +impl URL { + // https://url.spec.whatwg.org/#constructors + pub fn Constructor(global: GlobalRef, url: USVString, + base: Option) + -> Fallible> { + let parsed_base = match base { + None => { + // Step 1. + None + }, + Some(base) => + // Step 2.1. + match Url::parse(&base.0) { + Ok(base) => Some(base), + Err(error) => { + // Step 2.2. + return Err(Error::Type(format!("could not parse base: {}", error))); + } + } + }; + // Step 3. + let parsed_url = match parser_with_base(parsed_base.as_ref()).parse(&url.0) { + Ok(url) => url, + Err(error) => { + // Step 4. + return Err(Error::Type(format!("could not parse URL: {}", error))); + } + }; + // Steps 5-8. + Ok(URL::new(global, parsed_url)) + } + + // https://url.spec.whatwg.org/#dom-url-domaintoasciidomain + pub fn DomainToASCII(_: GlobalRef, origin: USVString) -> USVString { + // Step 1. + let ascii_domain = Host::parse(&origin.0); + if let Ok(Host::Domain(string)) = ascii_domain { + // Step 3. + USVString(string.to_owned()) + } else { + // Step 2. + USVString("".to_owned()) + } + } +} + +impl<'a> URLMethods for &'a URL { + // https://url.spec.whatwg.org/#dom-urlutils-hash + fn Hash(self) -> USVString { + UrlHelper::Hash(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-host + fn Host(self) -> USVString { + UrlHelper::Host(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-hostname + fn Hostname(self) -> USVString { + UrlHelper::Hostname(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-href + fn Href(self) -> USVString { + UrlHelper::Href(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-password + fn Password(self) -> USVString { + UrlHelper::Password(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-pathname + fn Pathname(self) -> USVString { + UrlHelper::Pathname(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-port + fn Port(self) -> USVString { + UrlHelper::Port(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-protocol + fn Protocol(self) -> USVString { + UrlHelper::Protocol(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-search + fn Search(self) -> USVString { + UrlHelper::Search(&self.url) + } + + // https://url.spec.whatwg.org/#URLUtils-stringification-behavior + fn Stringifier(self) -> DOMString { + self.Href().0 + } + + // https://url.spec.whatwg.org/#dom-urlutils-username + fn Username(self) -> USVString { + UrlHelper::Username(&self.url) + } +} + +fn parser_with_base<'a>(base: Option<&'a Url>) -> UrlParser<'a> { + let mut parser = UrlParser::new(); + if let Some(base) = base { + parser.base_url(base); + } + parser +} diff --git a/components/script/dom/urlhelper.rs b/components/script/dom/urlhelper.rs index d1930734f5c..4b2f2010fbf 100644 --- a/components/script/dom/urlhelper.rs +++ b/components/script/dom/urlhelper.rs @@ -7,24 +7,11 @@ use dom::bindings::str::USVString; use url::{Url, SchemeData}; use std::borrow::ToOwned; +use std::fmt::Write; pub struct UrlHelper; impl UrlHelper { - // https://url.spec.whatwg.org/#dom-urlutils-href - pub fn Href(url: &Url) -> USVString { - USVString(url.serialize()) - } - - // https://url.spec.whatwg.org/#dom-urlutils-search - pub fn Search(url: &Url) -> USVString { - USVString(match url.query { - None => "".to_owned(), - Some(ref query) if query.is_empty() => "".to_owned(), - Some(ref query) => format!("?{}", query) - }) - } - // https://url.spec.whatwg.org/#dom-urlutils-hash pub fn Hash(url: &Url) -> USVString { USVString(match url.fragment { @@ -34,6 +21,35 @@ impl UrlHelper { }) } + // https://url.spec.whatwg.org/#dom-urlutils-host + pub fn Host(url: &Url) -> USVString { + USVString(match url.scheme_data { + SchemeData::NonRelative(..) => "".to_owned(), + SchemeData::Relative(ref scheme_data) => { + let mut host = scheme_data.host.serialize(); + if let Some(port) = scheme_data.port { + write!(host, ":{}", port).unwrap(); + } + host + }, + }) + } + + // https://url.spec.whatwg.org/#dom-urlutils-hostname + pub fn Hostname(url: &Url) -> USVString { + USVString(url.serialize_host().unwrap_or_else(|| "".to_owned())) + } + + // https://url.spec.whatwg.org/#dom-urlutils-href + pub fn Href(url: &Url) -> USVString { + USVString(url.serialize()) + } + + // https://url.spec.whatwg.org/#dom-urlutils-password + pub fn Password(url: &Url) -> USVString { + USVString(url.password().unwrap_or("").to_owned()) + } + // https://url.spec.whatwg.org/#dom-urlutils-pathname pub fn Pathname(url: &Url) -> USVString { // FIXME: Url null check is skipped for now @@ -43,6 +59,19 @@ impl UrlHelper { }) } + // https://url.spec.whatwg.org/#dom-urlutils-port + pub fn Port(url: &Url) -> USVString { + USVString(match url.port() { + None => "".to_owned(), + Some(port) => port.to_string(), + }) + } + + // https://url.spec.whatwg.org/#dom-urlutils-protocol + pub fn Protocol(url: &Url) -> USVString { + USVString(format!("{}:", url.scheme.clone())) + } + // https://html.spec.whatwg.org/multipage/#same-origin pub fn SameOrigin(urlA: &Url, urlB: &Url) -> bool { if urlA.host() != urlB.host() { @@ -56,4 +85,18 @@ impl UrlHelper { } return true } + + // https://url.spec.whatwg.org/#dom-urlutils-search + pub fn Search(url: &Url) -> USVString { + USVString(match url.query { + None => "".to_owned(), + Some(ref query) if query.is_empty() => "".to_owned(), + Some(ref query) => format!("?{}", query) + }) + } + + // https://url.spec.whatwg.org/#dom-urlutils-username + pub fn Username(url: &Url) -> USVString { + USVString(url.username().unwrap_or("").to_owned()) + } } diff --git a/components/script/dom/webidls/URL.webidl b/components/script/dom/webidls/URL.webidl new file mode 100644 index 00000000000..b0d92b565be --- /dev/null +++ b/components/script/dom/webidls/URL.webidl @@ -0,0 +1,12 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// https://url.spec.whatwg.org/#url +[Constructor(USVString url, optional USVString base)/*, + Exposed=(Window,Worker)*/] +interface URL { + static USVString domainToASCII(USVString domain); + // static USVString domainToUnicode(USVString domain); +}; +URL implements URLUtils; diff --git a/components/script/dom/webidls/URLUtils.webidl b/components/script/dom/webidls/URLUtils.webidl index be3174afb62..86e5140311b 100644 --- a/components/script/dom/webidls/URLUtils.webidl +++ b/components/script/dom/webidls/URLUtils.webidl @@ -10,11 +10,17 @@ interface URLUtils { readonly attribute USVString href; //readonly attribute USVString origin; // attribute USVString protocol; + readonly attribute USVString protocol; // attribute USVString username; + readonly attribute USVString username; // attribute USVString password; + readonly attribute USVString password; // attribute USVString host; + readonly attribute USVString host; // attribute USVString hostname; + readonly attribute USVString hostname; // attribute USVString port; + readonly attribute USVString port; // attribute USVString pathname; readonly attribute USVString pathname; // attribute USVString search; diff --git a/components/script/dom/webidls/URLUtilsReadOnly.webidl b/components/script/dom/webidls/URLUtilsReadOnly.webidl index 0e07a221cd6..851db50c3fd 100644 --- a/components/script/dom/webidls/URLUtilsReadOnly.webidl +++ b/components/script/dom/webidls/URLUtilsReadOnly.webidl @@ -11,11 +11,15 @@ interface URLUtilsReadOnly { readonly attribute USVString href; //readonly attribute USVString origin; - //readonly attribute USVString protocol; - //readonly attribute USVString host; - //readonly attribute USVString hostname; - //readonly attribute USVString port; - //readonly attribute USVString pathname; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; readonly attribute USVString search; readonly attribute USVString hash; + + // This is only doing as well as gecko right now, bug 824857 is on file for + // adding attribute stringifier support. + stringifier; }; diff --git a/components/script/dom/workerlocation.rs b/components/script/dom/workerlocation.rs index ec56ad79015..b125b778822 100644 --- a/components/script/dom/workerlocation.rs +++ b/components/script/dom/workerlocation.rs @@ -12,6 +12,7 @@ use dom::urlhelper::UrlHelper; use dom::workerglobalscope::WorkerGlobalScope; use url::Url; +use util::str::DOMString; // https://html.spec.whatwg.org/multipage/#worker-locations #[dom_struct] @@ -36,16 +37,49 @@ impl WorkerLocation { } impl<'a> WorkerLocationMethods for &'a WorkerLocation { + // https://url.spec.whatwg.org/#dom-urlutils-hash + fn Hash(self) -> USVString { + UrlHelper::Hash(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-host + fn Host(self) -> USVString { + UrlHelper::Host(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-hostname + fn Hostname(self) -> USVString { + UrlHelper::Hostname(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-href fn Href(self) -> USVString { UrlHelper::Href(&self.url) } + // https://url.spec.whatwg.org/#dom-urlutils-pathname + fn Pathname(self) -> USVString { + UrlHelper::Pathname(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-port + fn Port(self) -> USVString { + UrlHelper::Port(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-protocol + fn Protocol(self) -> USVString { + UrlHelper::Protocol(&self.url) + } + + // https://url.spec.whatwg.org/#dom-urlutils-search fn Search(self) -> USVString { UrlHelper::Search(&self.url) } - fn Hash(self) -> USVString { - UrlHelper::Hash(&self.url) + // https://url.spec.whatwg.org/#URLUtils-stringification-behavior + fn Stringifier(self) -> DOMString { + self.Href().0 } } diff --git a/tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini b/tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini index b36bdd702f2..be2ee0358af 100644 --- a/tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/open-url-worker-origin.htm.ini @@ -1,9 +1,8 @@ [open-url-worker-origin.htm] type: testharness - expected: TIMEOUT - [XMLHttpRequest: worker scripts, origin and referrer] - expected: NOTRUN - [Referer header] expected: FAIL + [Origin header] + expected: FAIL + diff --git a/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini index 7c9a92fd902..c9c9517fb97 100644 --- a/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/send-after-setting-document-domain.htm.ini @@ -1,3 +1,4 @@ [send-after-setting-document-domain.htm] type: testharness - expected: TIMEOUT + [loading documents from original origin after setting document.domain] + expected: FAIL diff --git a/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini deleted file mode 100644 index e430a95be3c..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-cors.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[send-authentication-basic-cors.htm] - type: testharness - [XMLHttpRequest: send() - "Basic" authenticated CORS requests with user name and password passed to open() (asserts failure)] - expected: FAIL - diff --git a/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini b/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini deleted file mode 100644 index 52962976252..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/send-authentication-basic-setrequestheader.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[send-authentication-basic-setrequestheader.htm] - type: testharness - [XMLHttpRequest: send() - "Basic" authenticated request using setRequestHeader()] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_host.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location_host.html.ini deleted file mode 100644 index 61a0317a74c..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_host.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[location_host.html] - type: testharness - [location host] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_hostname.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location_hostname.html.ini deleted file mode 100644 index a91dc1def9f..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_hostname.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[location_hostname.html] - type: testharness - [location hostname] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_pathname.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location_pathname.html.ini deleted file mode 100644 index ab5d9e0cab5..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_pathname.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[location_pathname.html] - type: testharness - [location pathname] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_port.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location_port.html.ini deleted file mode 100644 index 16792b4c74e..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_port.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[location_port.html] - type: testharness - [location port] - expected: FAIL - diff --git a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_protocol.html.ini b/tests/wpt/metadata/html/browsers/history/the-location-interface/location_protocol.html.ini deleted file mode 100644 index 23ce5105758..00000000000 --- a/tests/wpt/metadata/html/browsers/history/the-location-interface/location_protocol.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[location_protocol.html] - type: testharness - [location protocol] - expected: FAIL - diff --git a/tests/wpt/metadata/url/interfaces.html.ini b/tests/wpt/metadata/url/interfaces.html.ini index b5376e22c9e..f1a85fdfc35 100644 --- a/tests/wpt/metadata/url/interfaces.html.ini +++ b/tests/wpt/metadata/url/interfaces.html.ini @@ -1,20 +1,5 @@ [interfaces.html] type: testharness - [URL interface: existence and properties of interface object] - expected: FAIL - - [URL interface object length] - expected: FAIL - - [URL interface: existence and properties of interface prototype object] - expected: FAIL - - [URL interface: existence and properties of interface prototype object's "constructor" property] - expected: FAIL - - [URL interface: operation domainToASCII(ScalarValueString)] - expected: FAIL - [URL interface: operation domainToUnicode(ScalarValueString)] expected: FAIL @@ -54,60 +39,12 @@ [URL interface: attribute hash] expected: FAIL - [URL must be primary interface of new URL("http://foo")] - expected: FAIL - - [Stringification of new URL("http://foo")] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "domainToASCII" with the proper type (0)] - expected: FAIL - - [URL interface: calling domainToASCII(ScalarValueString) on new URL("http://foo") with too few arguments must throw TypeError] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "domainToUnicode" with the proper type (1)] - expected: FAIL - - [URL interface: calling domainToUnicode(ScalarValueString) on new URL("http://foo") with too few arguments must throw TypeError] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "href" with the proper type (2)] - expected: FAIL - [URL interface: new URL("http://foo") must inherit property "origin" with the proper type (3)] expected: FAIL - [URL interface: new URL("http://foo") must inherit property "protocol" with the proper type (4)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "username" with the proper type (5)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "password" with the proper type (6)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "host" with the proper type (7)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "hostname" with the proper type (8)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "port" with the proper type (9)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "pathname" with the proper type (10)] - expected: FAIL - - [URL interface: new URL("http://foo") must inherit property "search" with the proper type (11)] - expected: FAIL - [URL interface: new URL("http://foo") must inherit property "searchParams" with the proper type (12)] expected: FAIL - [URL interface: new URL("http://foo") must inherit property "hash" with the proper type (13)] - expected: FAIL - [URLSearchParams interface: existence and properties of interface object] expected: FAIL diff --git a/tests/wpt/metadata/url/url-constructor.html.ini b/tests/wpt/metadata/url/url-constructor.html.ini index 70ff96504c6..38edb8e61cc 100644 --- a/tests/wpt/metadata/url/url-constructor.html.ini +++ b/tests/wpt/metadata/url/url-constructor.html.ini @@ -1,812 +1,38 @@ [url-constructor.html] type: testharness - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <\t :foo.com \n> against ] - expected: FAIL - - [Parsing: < foo.com > against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: <> against ] - expected: FAIL - - [Parsing: < \t> against ] - expected: FAIL - - [Parsing: <:foo.com/> against ] - expected: FAIL - - [Parsing: <:foo.com\\> against ] - expected: FAIL - - [Parsing: <:> against ] - expected: FAIL - - [Parsing: <:a> against ] - expected: FAIL - - [Parsing: <:/> against ] - expected: FAIL - - [Parsing: <:\\> against ] - expected: FAIL - - [Parsing: <:#> against ] - expected: FAIL - - [Parsing: <#> against ] - expected: FAIL - - [Parsing: <#/> against ] - expected: FAIL - - [Parsing: <#\\> against ] - expected: FAIL - - [Parsing: <#;?> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <:23> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <::> against ] - expected: FAIL - - [Parsing: <::23> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <[61:24:74\]:98> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: <#β> against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: < File:c|////foo\\bar.html> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <\\\\server\\file> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <.> against ] - expected: FAIL - - [Parsing: <..> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <./test.txt> against ] - expected: FAIL - - [Parsing: <../test.txt> against ] - expected: FAIL - - [Parsing: <../aaa/test.txt> against ] - expected: FAIL - - [Parsing: <../../test.txt> against ] - expected: FAIL - - [Parsing: <中/test.txt> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - [Parsing: against ] expected: FAIL - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - - [Parsing: <> against ] - expected: FAIL - - [Parsing: against ] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/WorkerLocation.htm.ini b/tests/wpt/metadata/workers/WorkerLocation.htm.ini deleted file mode 100644 index a975858ceb7..00000000000 --- a/tests/wpt/metadata/workers/WorkerLocation.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[WorkerLocation.htm] - type: testharness - [ WorkerLocation object ] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/WorkerLocation_pathname.htm.ini b/tests/wpt/metadata/workers/WorkerLocation_pathname.htm.ini deleted file mode 100644 index 16c66f196e4..00000000000 --- a/tests/wpt/metadata/workers/WorkerLocation_pathname.htm.ini +++ /dev/null @@ -1,5 +0,0 @@ -[WorkerLocation_pathname.htm] - type: testharness - [ WorkerLocation URL decomposition IDL attribute: pathname ] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/interfaces.worker.js.ini b/tests/wpt/metadata/workers/interfaces.worker.js.ini index 09a609f8a01..c8839fa803b 100644 --- a/tests/wpt/metadata/workers/interfaces.worker.js.ini +++ b/tests/wpt/metadata/workers/interfaces.worker.js.ini @@ -54,39 +54,9 @@ [WorkerLocation interface: attribute origin] expected: FAIL - [WorkerLocation interface: attribute protocol] - expected: FAIL - - [WorkerLocation interface: attribute host] - expected: FAIL - - [WorkerLocation interface: attribute hostname] - expected: FAIL - - [WorkerLocation interface: attribute port] - expected: FAIL - - [WorkerLocation interface: attribute pathname] - expected: FAIL - [WorkerLocation interface: self.location must inherit property "origin" with the proper type (1)] expected: FAIL - [WorkerLocation interface: self.location must inherit property "protocol" with the proper type (2)] - expected: FAIL - - [WorkerLocation interface: self.location must inherit property "host" with the proper type (3)] - expected: FAIL - - [WorkerLocation interface: self.location must inherit property "hostname" with the proper type (4)] - expected: FAIL - - [WorkerLocation interface: self.location must inherit property "port" with the proper type (5)] - expected: FAIL - - [WorkerLocation interface: self.location must inherit property "pathname" with the proper type (6)] - expected: FAIL - [DedicatedWorkerGlobalScope interface: self must inherit property "postMessage" with the proper type (0)] expected: FAIL diff --git a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/members.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/members.html.ini deleted file mode 100644 index d708f6da6f9..00000000000 --- a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/members.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[members.html] - type: testharness - [members of WorkerLocation] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini deleted file mode 100644 index 9ee10df13e6..00000000000 --- a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/setting-members.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[setting-members.html] - type: testharness - [setting members of WorkerLocation] - expected: FAIL - diff --git a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini b/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini deleted file mode 100644 index e1a42889a54..00000000000 --- a/tests/wpt/metadata/workers/interfaces/WorkerGlobalScope/location/worker-separate-file.html.ini +++ /dev/null @@ -1,5 +0,0 @@ -[worker-separate-file.html] - type: testharness - [location with a worker in separate file] - expected: FAIL - diff --git a/tests/wpt/mozilla/tests/mozilla/interfaces.html b/tests/wpt/mozilla/tests/mozilla/interfaces.html index ea5c1ec8a03..e1933f77c76 100644 --- a/tests/wpt/mozilla/tests/mozilla/interfaces.html +++ b/tests/wpt/mozilla/tests/mozilla/interfaces.html @@ -193,6 +193,7 @@ var interfaceNamesInGlobalScope = [ "TextEncoder", "TreeWalker", "UIEvent", + "URL", "URLSearchParams", "ValidityState", "WebGLRenderingContext",