diff options
83 files changed, 192 insertions, 383 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index e70501d3711..9366f9e18bb 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -349,6 +349,10 @@ impl Document { true } + pub fn origin(&self) -> &Origin { + &self.origin + } + // https://dom.spec.whatwg.org/#concept-document-url pub fn url(&self) -> &Url { &self.url diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl index 651c7081305..7057a4541a6 100644 --- a/components/script/dom/webidls/Window.webidl +++ b/components/script/dom/webidls/Window.webidl @@ -54,6 +54,8 @@ void cancelAnimationFrame(unsigned long handle); //void postMessage(any message, DOMString targetOrigin, optional sequence<Transferable> transfer); + [Throws] + void postMessage(any message, DOMString targetOrigin); // also has obsolete members }; diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index ebd9550d117..c25c826b4ec 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -19,8 +19,10 @@ use dom::bindings::global::{GlobalRef, global_root_from_object}; use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, MutNullableHeap, Root}; use dom::bindings::num::Finite; +use dom::bindings::refcounted::Trusted; use dom::bindings::reflector::Reflectable; use dom::bindings::str::DOMString; +use dom::bindings::structuredclone::StructuredCloneData; use dom::bindings::utils::{GlobalStaticData, WindowProxyHandler}; use dom::browsingcontext::BrowsingContext; use dom::console::Console; @@ -33,6 +35,7 @@ use dom::eventtarget::EventTarget; use dom::history::History; use dom::htmliframeelement::build_mozbrowser_custom_event; use dom::location::Location; +use dom::messageevent::MessageEvent; use dom::navigator::Navigator; use dom::node::{Node, from_untrusted_node_address, window_from_node}; use dom::performance::Performance; @@ -43,6 +46,7 @@ use gfx_traits::LayerId; use ipc_channel::ipc::{self, IpcSender}; use js::jsapi::{Evaluate2, HandleObject, HandleValue, JSAutoCompartment, JSContext}; use js::jsapi::{JS_GetRuntime, JS_GC, MutableHandleValue, SetWindowProxy}; +use js::jsval::UndefinedValue; use js::rust::CompileOptionsWrapper; use js::rust::Runtime; use libc; @@ -53,6 +57,7 @@ use net_traits::image_cache_thread::{ImageCacheChan, ImageCacheThread}; use net_traits::storage_thread::StorageType; use num_traits::ToPrimitive; use open; +use origin::Origin; use profile_traits::mem; use profile_traits::time::{ProfilerCategory, TimerMetadata, TimerMetadataFrameType}; use profile_traits::time::{ProfilerChan, TimerMetadataReflowType, profile}; @@ -62,9 +67,9 @@ use script_layout_interface::message::{Msg, Reflow, ReflowQueryType, ScriptReflo use script_layout_interface::reporter::CSSErrorReporter; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse, LayoutRPC}; use script_layout_interface::rpc::{MarginStyleResponse, ResolvedStyleResponse}; -use script_runtime::{ScriptChan, ScriptPort, maybe_take_panic_result}; +use script_runtime::{ScriptChan, ScriptPort, CommonScriptMsg, ScriptThreadEventCategory, maybe_take_panic_result}; use script_thread::SendableMainThreadScriptChan; -use script_thread::{MainThreadScriptChan, MainThreadScriptMsg, RunnableWrapper}; +use script_thread::{MainThreadScriptChan, MainThreadScriptMsg, RunnableWrapper, Runnable}; use script_traits::webdriver_msg::{WebDriverJSError, WebDriverJSResult}; use script_traits::{ConstellationControlMsg, MozBrowserEvent, UntrustedNodeAddress}; use script_traits::{DocumentState, MsDuration, TimerEvent, TimerEventId}; @@ -650,6 +655,38 @@ impl WindowMethods for Window { doc.cancel_animation_frame(ident); } + // https://html.spec.whatwg.org/multipage/#dom-window-postmessage + fn PostMessage(&self, + cx: *mut JSContext, + message: HandleValue, + origin: DOMString) + -> ErrorResult { + // Step 3-5. + let origin = match &origin[..] { + "*" => None, + "/" => { + // TODO(#12715): Should be the origin of the incumbent settings + // object, not self's. + Some(self.Document().origin().copy()) + }, + url => match Url::parse(&url) { + Ok(url) => Some(Origin::new(&url)), + Err(_) => return Err(Error::Syntax), + } + }; + + // Step 1-2, 6-8. + // TODO(#12717): Should implement the `transfer` argument. + let data = try!(StructuredCloneData::write(cx, message)); + + // Step 9. + let runnable = PostMessageHandler::new(self, origin, data); + let msg = CommonScriptMsg::RunnableMsg(ScriptThreadEventCategory::DomEvent, box runnable); + // TODO(#12718): Use the "posted message task source". + let _ = self.script_chan.send(msg); + Ok(()) + } + // https://html.spec.whatwg.org/multipage/#dom-window-captureevents fn CaptureEvents(&self) { // This method intentionally does nothing @@ -1767,3 +1804,50 @@ fn debug_reflow_events(id: PipelineId, goal: &ReflowGoal, query_type: &ReflowQue println!("{}", debug_msg); } + +struct PostMessageHandler { + destination: Trusted<Window>, + origin: Option<Origin>, + message: StructuredCloneData, +} + +impl PostMessageHandler { + fn new(window: &Window, + origin: Option<Origin>, + message: StructuredCloneData) -> PostMessageHandler { + PostMessageHandler { + destination: Trusted::new(window), + origin: origin, + message: message, + } + } +} + +impl Runnable for PostMessageHandler { + // https://html.spec.whatwg.org/multipage/#dom-window-postmessage steps 10-12. + fn handler(self: Box<PostMessageHandler>) { + let this = *self; + let window = this.destination.root(); + + // Step 10. + let doc = window.Document(); + if let Some(source) = this.origin { + if !source.same_origin(doc.origin()) { + return; + } + } + + let cx = window.get_cx(); + let globalhandle = window.reflector().get_jsobject(); + let _ac = JSAutoCompartment::new(cx, globalhandle.get()); + + rooted!(in(cx) let mut message = UndefinedValue()); + this.message.read(GlobalRef::Window(&*window), message.handle_mut()); + + // Step 11-12. + // TODO(#12719): set the other attributes. + MessageEvent::dispatch_jsval(window.upcast(), + GlobalRef::Window(&*window), + message.handle()); + } +} diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-block-defer-scripts.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-block-defer-scripts.html.ini deleted file mode 100644 index 2498afccaec..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-block-defer-scripts.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[xmlhttprequest-sync-block-defer-scripts.html] - type: testharness - expected: TIMEOUT - [Check that a sync XHR in a defer script blocks later defer scripts from running] - expected: NOTRUN - diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html.ini deleted file mode 100644 index 18ba90ba68c..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-sync-not-hang-scriptloader.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[xmlhttprequest-sync-not-hang-scriptloader.html] - type: testharness - expected: TIMEOUT - [Ensure that an async script added during a defer script that then does a\n sync XHR still runs] - expected: NOTRUN - diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini deleted file mode 100644 index 86eef0d567c..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-aborted.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-aborted.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini deleted file mode 100644 index a8bb968e3c2..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-abortedonmain.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-abortedonmain.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini deleted file mode 100644 index e767ee33d53..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overrides.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-overrides.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini deleted file mode 100644 index d957c5c0fc9..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-overridesexpires.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-overridesexpires.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini deleted file mode 100644 index ffe4fbb6090..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-simple.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-simple.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini deleted file mode 100644 index bb65b7c1ea6..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-synconmain.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-synconmain.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini b/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini deleted file mode 100644 index 3b7ed012777..00000000000 --- a/tests/wpt/metadata/XMLHttpRequest/xmlhttprequest-timeout-twice.html.ini +++ /dev/null @@ -1,3 +0,0 @@ -[xmlhttprequest-timeout-twice.html] - type: testharness - expected: TIMEOUT diff --git a/tests/wpt/metadata/fetch/api/headers/headers-structure.html.ini b/tests/wpt/metadata/fetch/api/headers/headers-structure.html.ini index 6c517acf6ab..e2cbf6a708e 100644 --- a/tests/wpt/metadata/fetch/api/headers/headers-structure.html.ini +++ b/tests/wpt/metadata/fetch/api/headers/headers-structure.html.ini @@ -1,6 +1,5 @@ [headers-structure.html] type: testharness - expected: OK [Headers has entries method] expected: FAIL diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/001.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/001.html.ini deleted file mode 100644 index f02a01ba835..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/001.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[001.html] - type: testharness - expected: TIMEOUT - [Cross-origin navigation started from unload handler] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/002.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/002.html.ini deleted file mode 100644 index aff071a1e63..00000000000 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/002.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[002.html] - type: testharness - expected: TIMEOUT - [Multiple simultaneous navigations] - expected: TIMEOUT - diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/003.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/003.html.ini index 1afb64f0264..238e325f4a1 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/003.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/003.html.ini @@ -2,5 +2,5 @@ type: testharness expected: TIMEOUT [Navigation from unload whilst traversing history] - expected: NOTRUN + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/004.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/004.html.ini index 9dc5bc55d56..dd6207f9f2d 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/004.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/004.html.ini @@ -2,5 +2,5 @@ type: testharness expected: TIMEOUT [Navigation from unload whilst traversing cross-origin history] - expected: NOTRUN + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_location.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_location.html.ini index fca00e5fc48..b623e34998a 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_location.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_location.html.ini @@ -2,5 +2,5 @@ type: testharness expected: TIMEOUT [Child document navigating parent via location ] - expected: NOTRUN + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html.ini index ce0a327ae47..a3de688eef5 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/child_navigates_parent_submit.html.ini @@ -2,5 +2,5 @@ type: testharness expected: TIMEOUT [Child document navigating parent via submit ] - expected: NOTRUN + expected: TIMEOUT diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_same_origin.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_same_origin.html.ini index e2beb67cb56..cb9545b5ecb 100644 --- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_same_origin.html.ini +++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation_unload_same_origin.html.ini @@ -1,6 +1,5 @@ [navigation_unload_same_origin.html] type: testharness - expected: TIMEOUT [Same-origin navigation started from unload handler] - expected: TIMEOUT + expected: FAIL diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.ini index 506953b59b5..35b9d111e6b 100644 --- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.ini +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping.html.ini @@ -2,5 +2,5 @@ type: testharness expected: TIMEOUT [Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used] - expected: NOTRUN + expected: TIMEOUT diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini deleted file mode 100644 index 6ffc966af63..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini deleted file mode 100644 index 1d49c4c9760..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini deleted file mode 100644 index ae3a9d98b6b..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/cross-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini deleted file mode 100644 index 5af2c12b0e1..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini deleted file mode 100644 index 7c6bb620d7f..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini deleted file mode 100644 index 53da4f9d5d5..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer-when-downgrade/http-rp/same-origin/http-http/script-tag/insecure-protocol.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[insecure-protocol.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 90b6ac18f76..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index f6ff8e70189..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 0fa360d86c0..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 18542e07aa9..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index 8f576117a72..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 41ea8e613db..00000000000 --- a/tests/wpt/metadata/referrer-policy/no-referrer/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini deleted file mode 100644 index 4e723531217..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini deleted file mode 100644 index 363896ca9c8..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini deleted file mode 100644 index 1c8e5cdff66..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini deleted file mode 100644 index 08c9edfdce6..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini deleted file mode 100644 index d99fc25f106..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini deleted file mode 100644 index 61c4f57535d..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin-when-cross-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 99a0a164997..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index 5e96adf50d1..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 6c040043344..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 402506b5162..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index ea22b5b6bbc..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 15a70aa54c0..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini index cf6b31feca0..9d66542833f 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.keep-origin-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini index 177c9f8bf51..a9555c4e535 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.no-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini index ba2cda4608f..61b022733b3 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.swap-origin-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini index 70cb99a79d9..45b90e08d06 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.keep-origin-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini index e09372f6a90..1e6789efb98 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.no-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini index 5fc1f9bc8b5..39adeb9b21e 100644 --- a/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/origin/meta-csp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini @@ -1,6 +1,5 @@ [generic.swap-origin-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 0bcfc3c232f..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index bc23ed72de6..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 0943136a235..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 69155ba5493..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index 26817a69f69..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 766493738b8..00000000000 --- a/tests/wpt/metadata/referrer-policy/origin/meta-referrer/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is origin when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini deleted file mode 100644 index 146317af929..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini deleted file mode 100644 index 990b74b37fa..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini deleted file mode 100644 index 87c28376e4b..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini deleted file mode 100644 index 08c9edfdce6..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini deleted file mode 100644 index d99fc25f106..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini deleted file mode 100644 index 00c3e57ebb2..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/http-rp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini deleted file mode 100644 index 5723fe77474..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini deleted file mode 100644 index 2574a643ca5..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini deleted file mode 100644 index f3c6c96bd28..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini index 60a2cf56f51..53cf4e59c2a 100644 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini @@ -1,6 +1,5 @@ [same-origin-insecure.keep-origin-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini index a9988074da1..d50005cc3ea 100644 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini +++ b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini @@ -1,6 +1,5 @@ [same-origin-insecure.no-redirect.http.html] type: testharness - expected: TIMEOUT [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN + expected: FAIL diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini deleted file mode 100644 index ddd8db5a574..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-csp/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-csp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini deleted file mode 100644 index a24fa4b22cb..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini deleted file mode 100644 index 11b8e2c78ad..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini deleted file mode 100644 index babbc981dd1..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/cross-origin/http-http/script-tag/cross-origin.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[cross-origin.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini deleted file mode 100644 index 952b6c6e1fc..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini deleted file mode 100644 index 751ccca6ad1..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini deleted file mode 100644 index 883bec0c1f0..00000000000 --- a/tests/wpt/metadata/referrer-policy/same-origin/meta-referrer/same-origin/http-http/script-tag/same-origin-insecure.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[same-origin-insecure.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is omitted when a\n document served over http requires an http\n sub-resource via script-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 44b6265552d..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index 5b63940f74b..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index 194a78ec331..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/cross-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini deleted file mode 100644 index 2f8bd98e853..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.keep-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.keep-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini deleted file mode 100644 index 6ddc058aacd..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.no-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.no-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini b/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini deleted file mode 100644 index c7a84d42e8b..00000000000 --- a/tests/wpt/metadata/referrer-policy/unsafe-url/http-rp/same-origin/http-http/script-tag/generic.swap-origin-redirect.http.html.ini +++ /dev/null @@ -1,6 +0,0 @@ -[generic.swap-origin-redirect.http.html] - type: testharness - expected: TIMEOUT - [The referrer URL is stripped-referrer when a\n document served over http requires an http\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] - expected: NOTRUN - diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 20107d1e105..4d0e9b89ac2 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -9102,6 +9102,12 @@ "url": "/_mozilla/mozilla/websocket_connection_fail.html" } ], + "mozilla/window-postmessage-sameorigin.html": [ + { + "path": "mozilla/window-postmessage-sameorigin.html", + "url": "/_mozilla/mozilla/window-postmessage-sameorigin.html" + } + ], "mozilla/window.html": [ { "path": "mozilla/window.html", diff --git a/tests/wpt/mozilla/tests/mozilla/window-postmessage-sameorigin.html b/tests/wpt/mozilla/tests/mozilla/window-postmessage-sameorigin.html new file mode 100644 index 00000000000..a3ec80929b7 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/window-postmessage-sameorigin.html @@ -0,0 +1,80 @@ +<!doctype html> +<meta charset="utf-8"> +<title>Same-origin postMessage on the Window object</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="resources/origin_helpers.js?pipe=sub"></script> +<script> +setup({ + explicit_done: true +}); + +function expect_error(error, message, origin, description) { + return function(setlistener, removelistener, type) { + test(function(t) { + assert_throws(error, function() { postMessage(message, origin) }); + }, description + ' (' + type + ')'); + } +} + +function expect_message(message, origin, test) { + return function(setlistener, removelistener, type) { + async_test(function(t) { + setlistener(t.step_func_done(function(e) { + removelistener(arguments.callee); + assert_true(e.isTrusted); + assert_equals(e.data, message); + })); + postMessage(message, origin); + }, test + ' (' + type + ')'); + } +} + +function expect_no_message(message, origin, test) { + return function(setlistener, removelistener, type) { + async_test(function(t) { + setlistener(t.step_func_done(function(e) { + removelistener(arguments.callee); + assert_equals(e.data, 'expected-sequencing-message'); + })); + postMessage(message, origin); + postMessage('expected-sequencing-message', '*'); + }, test + ' (' + type + ')'); + } +} + +var base_tests = [ + function() { return expect_message('basic', '*', 'any origin, cloneable string message') }, + function() { return expect_message('basic', '/', 'same origin, cloneable string message') }, + function() { return expect_message('basic', HTTP_ORIGIN, 'explicit same origin, cloneable string message') }, + function() { return expect_no_message('basic', HTTPS_ORIGIN, 'explicit cross origin, cloneable string message') }, + function() { return expect_error(new SyntaxError(), 'basic', 'not-a-url', 'explicit invalid url, cloneable string message') }, + function() { return expect_error('DATA_CLONE_ERR', window, '*', 'any origin, non-cloneable message') }, +]; + +var tests = []; +var add_handler = function(listener) { window.onmessage = listener; }; +var remove_handler = function(listener) { window.onmessage = null; }; +var remove_listener = function(listener) { window.removeEventListener('message', listener); } +var add_listener = function(listener) { window.addEventListener('message', listener); }; +for (var i = 0; i < base_tests.length; i++) { + var f = base_tests[i](); + tests.push(f.bind(window, add_listener, remove_listener, "listener")); + tests.push(f.bind(window, add_handler, remove_handler, "handler")); +} + +var current_test = 0; +function next_test() { + if (current_test < tests.length) { + tests[current_test++](); + } else { + done(); + } +} + +add_result_callback(function() { + next_test(); +}); + +next_test(); +</script> |