Skip to content
Permalink
Browse files

Update Window::open and document::open parameters to match the spec

Fixes #24012
  • Loading branch information...
Eijebong committed Aug 24, 2019
1 parent 6ff2524 commit ec6b478775056c7cc31509c2a50856b041fb3bf8
@@ -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<DomRoot<WindowProxy>> {
@@ -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]
@@ -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);

@@ -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<DomRoot<WindowProxy>> {
@@ -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<DomRoot<WindowProxy>> {
@@ -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

This file was deleted.

0 comments on commit ec6b478

Please sign in to comment.
You can’t perform that action at this time.