diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index e6cd5468e98..fcacb4cedad 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -4453,7 +4453,7 @@ impl DocumentMethods for Document { // https://html.spec.whatwg.org/multipage/#dom-document-open-window fn Open_( &self, - url: DOMString, + url: USVString, target: DOMString, features: DOMString, ) -> Fallible> { diff --git a/components/script/dom/webidls/Document.webidl b/components/script/dom/webidls/Document.webidl index ebcdea32166..04e5b851c3f 100644 --- a/components/script/dom/webidls/Document.webidl +++ b/components/script/dom/webidls/Document.webidl @@ -122,7 +122,7 @@ partial /*sealed*/ interface Document { [CEReactions, Throws] Document open(optional DOMString unused1, optional DOMString unused2); [CEReactions, Throws] - WindowProxy open(DOMString url, DOMString name, DOMString features); + WindowProxy open(USVString url, DOMString name, DOMString features); [CEReactions, Throws] void close(); [CEReactions, Throws] diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 56d9d06a819..28937d06e6c 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -40,7 +40,7 @@ // https://github.com/whatwg/html/issues/2115 [Replaceable] readonly attribute WindowProxy? parent; readonly attribute Element? frameElement; - WindowProxy? open(optional DOMString url = "about:blank", optional DOMString target = "_blank", + WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional DOMString features = ""); //getter WindowProxy (unsigned long index); diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 09247103d0c..933799dc067 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -616,7 +616,7 @@ impl WindowMethods for Window { // https://html.spec.whatwg.org/multipage/#dom-open fn Open( &self, - url: DOMString, + url: USVString, target: DOMString, features: DOMString, ) -> Option> { diff --git a/components/script/dom/windowproxy.rs b/components/script/dom/windowproxy.rs index d64975a78b9..3ff326c683a 100644 --- a/components/script/dom/windowproxy.rs +++ b/components/script/dom/windowproxy.rs @@ -10,7 +10,7 @@ use crate::dom::bindings::inheritance::Castable; use crate::dom::bindings::proxyhandler::fill_property_descriptor; use crate::dom::bindings::reflector::{DomObject, Reflector}; use crate::dom::bindings::root::{Dom, DomRoot}; -use crate::dom::bindings::str::DOMString; +use crate::dom::bindings::str::{DOMString, USVString}; use crate::dom::bindings::trace::JSTraceable; use crate::dom::bindings::utils::{get_array_index_from_id, AsVoidPtr, WindowProxyHandler}; use crate::dom::dissimilaroriginwindow::DissimilarOriginWindow; @@ -395,7 +395,7 @@ impl WindowProxy { // https://html.spec.whatwg.org/multipage/#window-open-steps pub fn open( &self, - url: DOMString, + url: USVString, target: DOMString, features: DOMString, ) -> Option> { diff --git a/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini b/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini index f5118b7d9f5..35196e2d082 100644 --- a/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini +++ b/tests/wpt/metadata/fetch/security/embedded-credentials.tentative.sub.html.ini @@ -1,6 +1,5 @@ [embedded-credentials.tentative.sub.html] type: testharness - expected: TIMEOUT [Embedded credentials are treated as network errors.] expected: FAIL @@ -11,11 +10,11 @@ expected: FAIL [Embedded credentials matching the top-level are not treated as network errors for relative URLs.] - expected: TIMEOUT + expected: FAIL [Embedded credentials matching the top-level are not treated as network errors for same-origin URLs.] - expected: TIMEOUT + expected: FAIL [Embedded credentials matching the top-level are treated as network errors for cross-origin URLs.] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/the-window-object/window-open-defaults.window.js.ini b/tests/wpt/metadata/html/browsers/the-window-object/window-open-defaults.window.js.ini deleted file mode 100644 index 8e1733fed8b..00000000000 --- a/tests/wpt/metadata/html/browsers/the-window-object/window-open-defaults.window.js.ini +++ /dev/null @@ -1,4 +0,0 @@ -[window-open-defaults.window.html] - [window.open()'s url parameter default] - expected: FAIL -