diff --git a/components/script/dom/url.rs b/components/script/dom/url.rs index 35dc4d896fa..dbcefe48e53 100644 --- a/components/script/dom/url.rs +++ b/components/script/dom/url.rs @@ -17,10 +17,8 @@ use ipc_channel::ipc; use net_traits::{CoreResourceMsg, IpcSend}; use net_traits::blob_url_store::{get_blob_origin, parse_blob_url}; use net_traits::filemanager_thread::FileManagerThreadMsg; -use std::borrow::ToOwned; use std::default::Default; -use url::{Host, Url}; -use url::quirks::domain_to_unicode; +use url::Url; use uuid::Uuid; // https://url.spec.whatwg.org/#url @@ -96,23 +94,6 @@ impl URL { Ok(result) } - // https://url.spec.whatwg.org/#dom-url-domaintoasciidomain - pub fn DomainToASCII(_: &GlobalScope, 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()) - } - } - - pub fn DomainToUnicode(_: &GlobalScope, origin: USVString) -> USVString { - USVString(domain_to_unicode(&origin.0)) - } - // https://w3c.github.io/FileAPI/#dfn-createObjectURL pub fn CreateObjectURL(global: &GlobalScope, blob: &Blob) -> DOMString { /// XXX: Second field is an unicode-serialized Origin, it is a temporary workaround diff --git a/components/script/dom/webidls/URL.webidl b/components/script/dom/webidls/URL.webidl index 738beca4daa..7c47b6caa71 100644 --- a/components/script/dom/webidls/URL.webidl +++ b/components/script/dom/webidls/URL.webidl @@ -5,9 +5,6 @@ // 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); - [SetterThrows] /*stringifier*/ attribute USVString href; readonly attribute USVString origin; diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index bfc8b84612d..2f106202838 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -37715,7 +37715,9 @@ ] }, "local_changes": { - "deleted": [], + "deleted": [ + "url/url-domainToUnicode.html" + ], "deleted_reftests": {}, "items": { "reftest": { diff --git a/tests/wpt/web-platform-tests/url/historical.html b/tests/wpt/web-platform-tests/url/historical.html index 17fdb97294b..fe35b062250 100644 --- a/tests/wpt/web-platform-tests/url/historical.html +++ b/tests/wpt/web-platform-tests/url/historical.html @@ -26,4 +26,12 @@ test(function() { url.href = "./bar"; }); }, "Setting URL's href attribute and base URLs"); + +test(function() { + assert_equals(URL.domainToASCII, undefined); +}, "URL.domainToASCII should be undefined"); + +test(function() { + assert_equals(URL.domainToUnicode, undefined); +}, "URL.domainToUnicode should be undefined"); diff --git a/tests/wpt/web-platform-tests/url/historical.worker.js b/tests/wpt/web-platform-tests/url/historical.worker.js index d90915a38a0..ccee73d2ec4 100644 --- a/tests/wpt/web-platform-tests/url/historical.worker.js +++ b/tests/wpt/web-platform-tests/url/historical.worker.js @@ -13,4 +13,12 @@ test(function() { }); }, "Setting URL's href attribute and base URLs"); +test(function() { + assert_equals(URL.domainToASCII, undefined); +}, "URL.domainToASCII should be undefined"); + +test(function() { + assert_equals(URL.domainToUnicode, undefined); +}, "URL.domainToUnicode should be undefined"); + done(); diff --git a/tests/wpt/web-platform-tests/url/interfaces.html b/tests/wpt/web-platform-tests/url/interfaces.html index 254242fb884..5d871ad684c 100644 --- a/tests/wpt/web-platform-tests/url/interfaces.html +++ b/tests/wpt/web-platform-tests/url/interfaces.html @@ -12,9 +12,6 @@ [Constructor(USVString url, optional USVString base), Exposed=(Window,Worker)] interface URL { - static USVString domainToASCII(USVString domain); - static USVString domainToUnicode(USVString domain); - stringifier attribute USVString href; readonly attribute USVString origin; attribute USVString protocol; diff --git a/tests/wpt/web-platform-tests/url/url-domainToUnicode.html b/tests/wpt/web-platform-tests/url/url-domainToUnicode.html deleted file mode 100644 index 1bd5536799a..00000000000 --- a/tests/wpt/web-platform-tests/url/url-domainToUnicode.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - -