Remove referrer policy from document (#34263)

* Remove the referrer policy from document and rely on its policy container

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Make ReferrerPolicy non-optional, instead using a new enum value to represent the empty string case

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Fix clippy issue

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

* Fix usage of Option<ReferrerPolicy> in unit test

Signed-off-by: Shane Handley <shanehandley@fastmail.com>

---------

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-11-19 23:45:10 +11:00 committed by GitHub
parent 83f8e88818
commit 975e2ae859
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
108 changed files with 171 additions and 1509 deletions

View file

@ -131,7 +131,7 @@ use media::{GLPlayerThreads, WindowGLContext};
use net_traits::pub_domains::reg_host; use net_traits::pub_domains::reg_host;
use net_traits::request::{Referrer, RequestBuilder}; use net_traits::request::{Referrer, RequestBuilder};
use net_traits::storage_thread::{StorageThreadMsg, StorageType}; use net_traits::storage_thread::{StorageThreadMsg, StorageType};
use net_traits::{self, FetchResponseMsg, IpcSend, ResourceThreads}; use net_traits::{self, FetchResponseMsg, IpcSend, ReferrerPolicy, ResourceThreads};
use profile_traits::{mem, time}; use profile_traits::{mem, time};
use script_layout_interface::{LayoutFactory, ScriptThreadFactory}; use script_layout_interface::{LayoutFactory, ScriptThreadFactory};
use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent}; use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent};
@ -1413,7 +1413,7 @@ where
url, url,
None, None,
Referrer::NoReferrer, Referrer::NoReferrer,
None, ReferrerPolicy::EmptyString,
None, None,
); );
let ctx_id = BrowsingContextId::from(top_level_browsing_context_id); let ctx_id = BrowsingContextId::from(top_level_browsing_context_id);
@ -3033,7 +3033,7 @@ where
url, url,
None, None,
Referrer::NoReferrer, Referrer::NoReferrer,
None, ReferrerPolicy::EmptyString,
None, None,
); );
let sandbox = IFrameSandboxState::IFrameUnsandboxed; let sandbox = IFrameSandboxState::IFrameUnsandboxed;

View file

@ -28,8 +28,8 @@ use net_traits::request::{
}; };
use net_traits::response::{Response, ResponseBody, ResponseType}; use net_traits::response::{Response, ResponseBody, ResponseType};
use net_traits::{ use net_traits::{
FetchTaskTarget, NetworkError, ResourceAttribute, ResourceFetchTiming, ResourceTimeValue, FetchTaskTarget, NetworkError, ReferrerPolicy, ResourceAttribute, ResourceFetchTiming,
ResourceTimingType, ResourceTimeValue, ResourceTimingType,
}; };
use rustls::Certificate; use rustls::Certificate;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@ -278,18 +278,16 @@ pub async fn main_fetch(
// Step 8: If requests referrer policy is the empty string, then set requests referrer policy // Step 8: If requests referrer policy is the empty string, then set requests referrer policy
// to requests policy containers referrer policy. // to requests policy containers referrer policy.
request.referrer_policy = request if request.referrer_policy == ReferrerPolicy::EmptyString {
.referrer_policy request.referrer_policy = policy_container.get_referrer_policy();
.or(Some(policy_container.referrer_policy)); }
assert!(request.referrer_policy.is_some());
let referrer_url = match mem::replace(&mut request.referrer, Referrer::NoReferrer) { let referrer_url = match mem::replace(&mut request.referrer, Referrer::NoReferrer) {
Referrer::NoReferrer => None, Referrer::NoReferrer => None,
Referrer::ReferrerUrl(referrer_source) | Referrer::Client(referrer_source) => { Referrer::ReferrerUrl(referrer_source) | Referrer::Client(referrer_source) => {
request.headers.remove(header::REFERER); request.headers.remove(header::REFERER);
determine_requests_referrer( determine_requests_referrer(
request.referrer_policy.unwrap(), request.referrer_policy,
referrer_source, referrer_source,
request.current_url(), request.current_url(),
) )

View file

@ -313,7 +313,7 @@ pub fn determine_requests_referrer(
current_url: ServoUrl, current_url: ServoUrl,
) -> Option<ServoUrl> { ) -> Option<ServoUrl> {
match referrer_policy { match referrer_policy {
ReferrerPolicy::NoReferrer => None, ReferrerPolicy::EmptyString | ReferrerPolicy::NoReferrer => None,
ReferrerPolicy::Origin => strip_url_for_use_as_referrer(referrer_source, true), ReferrerPolicy::Origin => strip_url_for_use_as_referrer(referrer_source, true),
ReferrerPolicy::UnsafeUrl => strip_url_for_use_as_referrer(referrer_source, false), ReferrerPolicy::UnsafeUrl => strip_url_for_use_as_referrer(referrer_source, false),
ReferrerPolicy::StrictOrigin => strict_origin(referrer_source, current_url), ReferrerPolicy::StrictOrigin => strict_origin(referrer_source, current_url),
@ -831,7 +831,9 @@ pub async fn http_fetch(
// response is guaranteed to be something by now // response is guaranteed to be something by now
let mut response = response.unwrap(); let mut response = response.unwrap();
// Step 5 // TODO: Step 5: cross-origin resource policy check
// Step 6
if response if response
.actual_response() .actual_response()
.status .status
@ -986,12 +988,12 @@ pub async fn http_redirect_fetch(
ResourceTimeValue::RedirectStart, ResourceTimeValue::RedirectStart,
)); // updates start_time only if redirect_start is nonzero (implying TAO) )); // updates start_time only if redirect_start is nonzero (implying TAO)
// Step 5 // Step 7: If requests redirect count is 20, then return a network error.
if request.redirect_count >= 20 { if request.redirect_count >= 20 {
return Response::network_error(NetworkError::Internal("Too many redirects".into())); return Response::network_error(NetworkError::Internal("Too many redirects".into()));
} }
// Step 6 // Step 8: Increase requests redirect count by 1.
request.redirect_count += 1; request.redirect_count += 1;
// Step 7 // Step 7
@ -1002,6 +1004,7 @@ pub async fn http_redirect_fetch(
request.current_url() request.current_url()
), ),
}; };
let has_credentials = has_credentials(&location_url); let has_credentials = has_credentials(&location_url);
if request.mode == RequestMode::CorsMode && !same_origin && has_credentials { if request.mode == RequestMode::CorsMode && !same_origin && has_credentials {
@ -1010,24 +1013,25 @@ pub async fn http_redirect_fetch(
)); ));
} }
// Step 8 // Step 9
if cors_flag && location_url.origin() != request.current_url().origin() {
request.origin = Origin::Origin(ImmutableOrigin::new_opaque());
}
// Step 10
if cors_flag && has_credentials { if cors_flag && has_credentials {
return Response::network_error(NetworkError::Internal("Credentials check failed".into())); return Response::network_error(NetworkError::Internal("Credentials check failed".into()));
} }
// Step 9 // Step 11: If internalResponses status is not 303, requests body is non-null, and requests
// bodys source is null, then return a network error.
if response.actual_response().status != StatusCode::SEE_OTHER && if response.actual_response().status != StatusCode::SEE_OTHER &&
request.body.as_ref().is_some_and(|b| b.source_is_null()) request.body.as_ref().is_some_and(|b| b.source_is_null())
{ {
return Response::network_error(NetworkError::Internal("Request body is not done".into())); return Response::network_error(NetworkError::Internal("Request body is not done".into()));
} }
// Step 10 // Step 12
if cors_flag && location_url.origin() != request.current_url().origin() {
request.origin = Origin::Origin(ImmutableOrigin::new_opaque());
}
// Step 11
if response if response
.actual_response() .actual_response()
.status .status
@ -1040,10 +1044,10 @@ pub async fn http_redirect_fetch(
request.method != Method::GET) request.method != Method::GET)
}) })
{ {
// Step 11.1 // Step 12.1
request.method = Method::GET; request.method = Method::GET;
request.body = None; request.body = None;
// Step 11.2 // Step 12.2
for name in &[ for name in &[
CONTENT_ENCODING, CONTENT_ENCODING,
CONTENT_LANGUAGE, CONTENT_LANGUAGE,
@ -1075,13 +1079,7 @@ pub async fn http_redirect_fetch(
request.url_list.push(location_url); request.url_list.push(location_url);
// Step 19: Invoke set requests referrer policy on redirect on request and internalResponse. // Step 19: Invoke set requests referrer policy on redirect on request and internalResponse.
if let Some(referrer_policy) = response set_requests_referrer_policy_on_redirect(request, response.actual_response());
.actual_response()
.headers
.typed_get::<headers::ReferrerPolicy>()
{
request.referrer_policy = Some(referrer_policy.into());
}
// Step 20: Let recursive be true. // Step 20: Let recursive be true.
// Step 21: If requests redirect mode is "manual", then... // Step 21: If requests redirect mode is "manual", then...
@ -2364,15 +2362,13 @@ fn append_a_request_origin_header(request: &mut Request) {
// Step 4.1 If requests mode is not "cors", then switch on requests referrer policy: // Step 4.1 If requests mode is not "cors", then switch on requests referrer policy:
if request.mode != RequestMode::CorsMode { if request.mode != RequestMode::CorsMode {
match request.referrer_policy { match request.referrer_policy {
Some(ReferrerPolicy::NoReferrer) => { ReferrerPolicy::NoReferrer => {
// Set serializedOrigin to `null`. // Set serializedOrigin to `null`.
serialized_origin = headers::Origin::NULL; serialized_origin = headers::Origin::NULL;
}, },
Some( ReferrerPolicy::NoReferrerWhenDowngrade |
ReferrerPolicy::NoReferrerWhenDowngrade | ReferrerPolicy::StrictOrigin |
ReferrerPolicy::StrictOrigin | ReferrerPolicy::StrictOriginWhenCrossOrigin => {
ReferrerPolicy::StrictOriginWhenCrossOrigin,
) => {
// If requests origin is a tuple origin, its scheme is "https", and // If requests origin is a tuple origin, its scheme is "https", and
// requests current URLs scheme is not "https", then set serializedOrigin to `null`. // requests current URLs scheme is not "https", then set serializedOrigin to `null`.
if let ImmutableOrigin::Tuple(scheme, _, _) = &request_origin { if let ImmutableOrigin::Tuple(scheme, _, _) = &request_origin {
@ -2381,7 +2377,7 @@ fn append_a_request_origin_header(request: &mut Request) {
} }
} }
}, },
Some(ReferrerPolicy::SameOrigin) => { ReferrerPolicy::SameOrigin => {
// If requests origin is not same origin with requests current URLs origin, // If requests origin is not same origin with requests current URLs origin,
// then set serializedOrigin to `null`. // then set serializedOrigin to `null`.
if *request_origin != request.current_url().origin() { if *request_origin != request.current_url().origin() {
@ -2507,3 +2503,18 @@ fn set_the_sec_fetch_user_header(r: &mut Request) {
// Step 5. Set a structured field value `Sec-Fetch-User`/header in rs header list. // Step 5. Set a structured field value `Sec-Fetch-User`/header in rs header list.
r.headers.typed_insert(header); r.headers.typed_insert(header);
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#set-requests-referrer-policy-on-redirect>
fn set_requests_referrer_policy_on_redirect(request: &mut Request, response: &Response) {
// Step 1: Let policy be the result of executing §8.1 Parse a referrer policy from a
// Referrer-Policy header on actualResponse.
let referrer_policy: ReferrerPolicy = response
.headers
.typed_get::<headers::ReferrerPolicy>()
.into();
// Step 2: If policy is not the empty string, then set requests referrer policy to policy.
if referrer_policy != ReferrerPolicy::EmptyString {
request.referrer_policy = referrer_policy;
}
}

View file

@ -322,7 +322,7 @@ fn test_cors_preflight_fetch() {
let target_url = url.clone().join("a.html").unwrap(); let target_url = url.clone().join("a.html").unwrap();
let mut request = RequestBuilder::new(url, Referrer::ReferrerUrl(target_url)).build(); let mut request = RequestBuilder::new(url, Referrer::ReferrerUrl(target_url)).build();
request.referrer_policy = Some(ReferrerPolicy::Origin); request.referrer_policy = ReferrerPolicy::Origin;
request.use_cors_preflight = true; request.use_cors_preflight = true;
request.mode = RequestMode::CorsMode; request.mode = RequestMode::CorsMode;
let fetch_response = fetch(&mut request, None); let fetch_response = fetch(&mut request, None);

View file

@ -371,9 +371,6 @@ pub struct Document {
/// The document's origin. /// The document's origin.
#[no_trace] #[no_trace]
origin: MutableOrigin, origin: MutableOrigin,
/// <https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-states>
#[no_trace]
referrer_policy: Cell<Option<ReferrerPolicy>>,
/// <https://html.spec.whatwg.org/multipage/#dom-document-referrer> /// <https://html.spec.whatwg.org/multipage/#dom-document-referrer>
referrer: Option<String>, referrer: Option<String>,
/// <https://html.spec.whatwg.org/multipage/#target-element> /// <https://html.spec.whatwg.org/multipage/#target-element>
@ -3295,7 +3292,6 @@ impl Document {
source: DocumentSource, source: DocumentSource,
doc_loader: DocumentLoader, doc_loader: DocumentLoader,
referrer: Option<String>, referrer: Option<String>,
referrer_policy: Option<ReferrerPolicy>,
status_code: Option<u16>, status_code: Option<u16>,
canceller: FetchCanceller, canceller: FetchCanceller,
) -> Document { ) -> Document {
@ -3401,7 +3397,6 @@ impl Document {
https_state: Cell::new(HttpsState::None), https_state: Cell::new(HttpsState::None),
origin, origin,
referrer, referrer,
referrer_policy: Cell::new(referrer_policy),
target_element: MutNullableDom::new(None), target_element: MutNullableDom::new(None),
policy_container: DomRefCell::new(PolicyContainer::default()), policy_container: DomRefCell::new(PolicyContainer::default()),
last_click_info: DomRefCell::new(None), last_click_info: DomRefCell::new(None),
@ -3580,7 +3575,6 @@ impl Document {
source: DocumentSource, source: DocumentSource,
doc_loader: DocumentLoader, doc_loader: DocumentLoader,
referrer: Option<String>, referrer: Option<String>,
referrer_policy: Option<ReferrerPolicy>,
status_code: Option<u16>, status_code: Option<u16>,
canceller: FetchCanceller, canceller: FetchCanceller,
can_gc: CanGc, can_gc: CanGc,
@ -3598,7 +3592,6 @@ impl Document {
source, source,
doc_loader, doc_loader,
referrer, referrer,
referrer_policy,
status_code, status_code,
canceller, canceller,
can_gc, can_gc,
@ -3619,7 +3612,6 @@ impl Document {
source: DocumentSource, source: DocumentSource,
doc_loader: DocumentLoader, doc_loader: DocumentLoader,
referrer: Option<String>, referrer: Option<String>,
referrer_policy: Option<ReferrerPolicy>,
status_code: Option<u16>, status_code: Option<u16>,
canceller: FetchCanceller, canceller: FetchCanceller,
can_gc: CanGc, can_gc: CanGc,
@ -3637,7 +3629,6 @@ impl Document {
source, source,
doc_loader, doc_loader,
referrer, referrer,
referrer_policy,
status_code, status_code,
canceller, canceller,
)), )),
@ -3762,7 +3753,6 @@ impl Document {
DocumentLoader::new(&self.loader()), DocumentLoader::new(&self.loader()),
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
); );
@ -3847,13 +3837,14 @@ impl Document {
} }
} }
pub fn set_referrer_policy(&self, policy: Option<ReferrerPolicy>) { pub fn set_referrer_policy(&self, policy: ReferrerPolicy) {
self.referrer_policy.set(policy); self.policy_container
.borrow_mut()
.set_referrer_policy(policy);
} }
//TODO - default still at no-referrer pub fn get_referrer_policy(&self) -> ReferrerPolicy {
pub fn get_referrer_policy(&self) -> Option<ReferrerPolicy> { self.policy_container.borrow().get_referrer_policy()
self.referrer_policy.get()
} }
pub fn set_target_element(&self, node: Option<&Element>, can_gc: CanGc) { pub fn set_target_element(&self, node: Option<&Element>, can_gc: CanGc) {
@ -4301,7 +4292,6 @@ impl DocumentMethods for Document {
docloader, docloader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
)) ))
@ -5621,18 +5611,17 @@ fn update_with_current_instant(marker: &Cell<Option<CrossProcessInstant>>) {
} }
/// <https://w3c.github.io/webappsec-referrer-policy/#determine-policy-for-token> /// <https://w3c.github.io/webappsec-referrer-policy/#determine-policy-for-token>
pub fn determine_policy_for_token(token: &str) -> Option<ReferrerPolicy> { pub fn determine_policy_for_token(token: &str) -> ReferrerPolicy {
match_ignore_ascii_case! { token, match_ignore_ascii_case! { token,
"never" | "no-referrer" => Some(ReferrerPolicy::NoReferrer), "never" | "no-referrer" => ReferrerPolicy::NoReferrer,
"no-referrer-when-downgrade" => Some(ReferrerPolicy::NoReferrerWhenDowngrade), "no-referrer-when-downgrade" => ReferrerPolicy::NoReferrerWhenDowngrade,
"origin" => Some(ReferrerPolicy::Origin), "origin" => ReferrerPolicy::Origin,
"same-origin" => Some(ReferrerPolicy::SameOrigin), "same-origin" => ReferrerPolicy::SameOrigin,
"strict-origin" => Some(ReferrerPolicy::StrictOrigin), "strict-origin" => ReferrerPolicy::StrictOrigin,
"default" | "strict-origin-when-cross-origin" => Some(ReferrerPolicy::StrictOriginWhenCrossOrigin), "default" | "strict-origin-when-cross-origin" => ReferrerPolicy::StrictOriginWhenCrossOrigin,
"origin-when-cross-origin" => Some(ReferrerPolicy::OriginWhenCrossOrigin), "origin-when-cross-origin" => ReferrerPolicy::OriginWhenCrossOrigin,
"always" | "unsafe-url" => Some(ReferrerPolicy::UnsafeUrl), "always" | "unsafe-url" => ReferrerPolicy::UnsafeUrl,
"" => Some(ReferrerPolicy::default()), _ => ReferrerPolicy::EmptyString,
_ => None,
} }
} }

View file

@ -159,7 +159,6 @@ impl DOMImplementationMethods for DOMImplementation {
loader, loader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
); );

View file

@ -86,7 +86,6 @@ impl DOMParserMethods for DOMParser {
loader, loader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
); );
@ -108,7 +107,6 @@ impl DOMParserMethods for DOMParser {
loader, loader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
); );

View file

@ -4539,11 +4539,11 @@ pub fn reflect_referrer_policy_attribute(element: &Element) -> DOMString {
DOMString::new() DOMString::new()
} }
pub(crate) fn referrer_policy_for_element(element: &Element) -> Option<ReferrerPolicy> { pub(crate) fn referrer_policy_for_element(element: &Element) -> ReferrerPolicy {
element element
.get_attribute_by_name(DOMString::from_string(String::from("referrerpolicy"))) .get_attribute_by_name(DOMString::from_string(String::from("referrerpolicy")))
.and_then(|attribute: DomRoot<Attr>| determine_policy_for_token(&attribute.Value())) .map(|attribute: DomRoot<Attr>| determine_policy_for_token(&attribute.Value()))
.or_else(|| document_from_node(element).get_referrer_policy()) .unwrap_or(document_from_node(element).get_referrer_policy())
} }
pub(crate) fn cors_setting_for_element(element: &Element) -> Option<CorsSettings> { pub(crate) fn cors_setting_for_element(element: &Element) -> Option<CorsSettings> {

View file

@ -2426,7 +2426,7 @@ impl GlobalScope {
} }
/// Get the Referrer Policy for this global scope. /// Get the Referrer Policy for this global scope.
pub fn get_referrer_policy(&self) -> Option<ReferrerPolicy> { pub fn get_referrer_policy(&self) -> ReferrerPolicy {
if let Some(window) = self.downcast::<Window>() { if let Some(window) = self.downcast::<Window>() {
let document = window.Document(); let document = window.Document();
@ -2435,7 +2435,7 @@ impl GlobalScope {
if let Some(worker) = self.downcast::<WorkerGlobalScope>() { if let Some(worker) = self.downcast::<WorkerGlobalScope>() {
let policy_container = worker.policy_container().to_owned(); let policy_container = worker.policy_container().to_owned();
return Some(policy_container.referrer_policy); return policy_container.get_referrer_policy();
} }
unreachable!(); unreachable!();
} }

View file

@ -336,7 +336,7 @@ pub(crate) fn image_fetch_request(
referrer: Referrer, referrer: Referrer,
pipeline_id: PipelineId, pipeline_id: PipelineId,
cors_setting: Option<CorsSettings>, cors_setting: Option<CorsSettings>,
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
from_picture_or_srcset: FromPictureOrSrcSet, from_picture_or_srcset: FromPictureOrSrcSet,
) -> RequestBuilder { ) -> RequestBuilder {
let mut request = let mut request =
@ -1523,12 +1523,13 @@ fn get_correct_referrerpolicy_from_raw_token(token: &DOMString) -> DOMString {
// so it should remain unchanged. // so it should remain unchanged.
DOMString::new() DOMString::new()
} else { } else {
match determine_policy_for_token(token) { let policy = determine_policy_for_token(token);
Some(policy) => DOMString::from_string(policy.to_string()),
// If the policy is set to an incorrect value, then it should be if policy == ReferrerPolicy::EmptyString {
// treated as an invalid value default (empty string). return DOMString::new();
None => DOMString::new(),
} }
DOMString::from_string(policy.to_string())
} }
} }

View file

@ -76,7 +76,7 @@ struct LinkProcessingOptions {
integrity: String, integrity: String,
link_type: String, link_type: String,
cross_origin: Option<CorsSettings>, cross_origin: Option<CorsSettings>,
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
policy_container: PolicyContainer, policy_container: PolicyContainer,
source_set: Option<()>, source_set: Option<()>,
base_url: ServoUrl, base_url: ServoUrl,
@ -502,12 +502,12 @@ impl StylesheetOwner for HTMLLinkElement {
self.parser_inserted.get() self.parser_inserted.get()
} }
fn referrer_policy(&self) -> Option<ReferrerPolicy> { fn referrer_policy(&self) -> ReferrerPolicy {
if self.RelList().Contains("noreferrer".into()) { if self.RelList().Contains("noreferrer".into()) {
return Some(ReferrerPolicy::NoReferrer); return ReferrerPolicy::NoReferrer;
} }
None ReferrerPolicy::EmptyString
} }
fn set_origin_clean(&self, origin_clean: bool) { fn set_origin_clean(&self, origin_clean: bool) {

View file

@ -266,8 +266,8 @@ impl StylesheetOwner for HTMLStyleElement {
self.parser_inserted.get() self.parser_inserted.get()
} }
fn referrer_policy(&self) -> Option<ReferrerPolicy> { fn referrer_policy(&self) -> ReferrerPolicy {
None ReferrerPolicy::EmptyString
} }
fn set_origin_clean(&self, origin_clean: bool) { fn set_origin_clean(&self, origin_clean: bool) {

View file

@ -2305,7 +2305,6 @@ impl Node {
DocumentSource::NotFromParser, DocumentSource::NotFromParser,
loader, loader,
None, None,
None,
document.status_code(), document.status_code(),
Default::default(), Default::default(),
can_gc, can_gc,

View file

@ -267,7 +267,7 @@ impl RequestMethods for Request {
// Step 13.4 // Step 13.4
request.referrer = global.get_referrer(); request.referrer = global.get_referrer();
// Step 13.5 // Step 13.5
request.referrer_policy = None; request.referrer_policy = MsgReferrerPolicy::EmptyString;
} }
// Step 14 // Step 14
@ -303,7 +303,7 @@ impl RequestMethods for Request {
// Step 15 // Step 15
if let Some(init_referrerpolicy) = init.referrerPolicy.as_ref() { if let Some(init_referrerpolicy) = init.referrerPolicy.as_ref() {
let init_referrer_policy = (*init_referrerpolicy).into(); let init_referrer_policy = (*init_referrerpolicy).into();
request.referrer_policy = Some(init_referrer_policy); request.referrer_policy = init_referrer_policy;
} }
// Step 16 // Step 16
@ -564,11 +564,7 @@ impl RequestMethods for Request {
// https://fetch.spec.whatwg.org/#dom-request-referrerpolicy // https://fetch.spec.whatwg.org/#dom-request-referrerpolicy
fn ReferrerPolicy(&self) -> ReferrerPolicy { fn ReferrerPolicy(&self) -> ReferrerPolicy {
self.request self.request.borrow().referrer_policy.into()
.borrow()
.referrer_policy
.map(|m| m.into())
.unwrap_or(ReferrerPolicy::_empty)
} }
// https://fetch.spec.whatwg.org/#dom-request-mode // https://fetch.spec.whatwg.org/#dom-request-mode
@ -825,6 +821,7 @@ impl From<ReferrerPolicy> for MsgReferrerPolicy {
impl From<MsgReferrerPolicy> for ReferrerPolicy { impl From<MsgReferrerPolicy> for ReferrerPolicy {
fn from(policy: MsgReferrerPolicy) -> Self { fn from(policy: MsgReferrerPolicy) -> Self {
match policy { match policy {
MsgReferrerPolicy::EmptyString => ReferrerPolicy::_empty,
MsgReferrerPolicy::NoReferrer => ReferrerPolicy::No_referrer, MsgReferrerPolicy::NoReferrer => ReferrerPolicy::No_referrer,
MsgReferrerPolicy::NoReferrerWhenDowngrade => { MsgReferrerPolicy::NoReferrerWhenDowngrade => {
ReferrerPolicy::No_referrer_when_downgrade ReferrerPolicy::No_referrer_when_downgrade

View file

@ -215,7 +215,6 @@ impl ServoParser {
loader, loader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
); );

View file

@ -76,7 +76,7 @@ struct PrefetchSink {
#[no_trace] #[no_trace]
referrer: Referrer, referrer: Referrer,
#[no_trace] #[no_trace]
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
#[no_trace] #[no_trace]
resource_threads: ResourceThreads, resource_threads: ResourceThreads,
prefetching: Cell<bool>, prefetching: Cell<bool>,
@ -203,10 +203,10 @@ impl PrefetchSink {
ServoUrl::parse_with_base(Some(base), &attr.value).ok() ServoUrl::parse_with_base(Some(base), &attr.value).ok()
} }
fn get_referrer_policy(&self, tag: &Tag, name: LocalName) -> Option<ReferrerPolicy> { fn get_referrer_policy(&self, tag: &Tag, name: LocalName) -> ReferrerPolicy {
self.get_attr(tag, name) self.get_attr(tag, name)
.and_then(|attr| determine_policy_for_token(&attr.value)) .map(|attr| determine_policy_for_token(&attr.value))
.or(self.referrer_policy) .unwrap_or(self.referrer_policy)
} }
fn get_cors_settings(&self, tag: &Tag, name: LocalName) -> Option<CorsSettings> { fn get_cors_settings(&self, tag: &Tag, name: LocalName) -> Option<CorsSettings> {

View file

@ -277,8 +277,7 @@ impl WorkerGlobalScopeMethods for WorkerGlobalScope {
.parser_metadata(ParserMetadata::NotParserInserted) .parser_metadata(ParserMetadata::NotParserInserted)
.use_url_credentials(true) .use_url_credentials(true)
.origin(global_scope.origin().immutable().clone()) .origin(global_scope.origin().immutable().clone())
.pipeline_id(Some(self.upcast::<GlobalScope>().pipeline_id())) .pipeline_id(Some(self.upcast::<GlobalScope>().pipeline_id()));
.referrer_policy(None);
let (url, source) = match fetch::load_whole_resource( let (url, source) = match fetch::load_whole_resource(
request, request,

View file

@ -55,7 +55,6 @@ impl XMLDocument {
doc_loader, doc_loader,
None, None,
None, None,
None,
Default::default(), Default::default(),
), ),
} }

View file

@ -168,7 +168,7 @@ pub struct XMLHttpRequest {
#[no_trace] #[no_trace]
referrer: Referrer, referrer: Referrer,
#[no_trace] #[no_trace]
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
canceller: DomRefCell<FetchCanceller>, canceller: DomRefCell<FetchCanceller>,
} }
@ -1533,7 +1533,6 @@ impl XMLHttpRequest {
docloader, docloader,
None, None,
None, None,
None,
Default::default(), Default::default(),
can_gc, can_gc,
) )

View file

@ -12,6 +12,7 @@ use std::sync::{Arc, Mutex};
use std::{mem, ptr}; use std::{mem, ptr};
use encoding_rs::UTF_8; use encoding_rs::UTF_8;
use headers::{HeaderMapExt, ReferrerPolicy as ReferrerPolicyHeader};
use html5ever::local_name; use html5ever::local_name;
use hyper_serde::Serde; use hyper_serde::Serde;
use indexmap::IndexSet; use indexmap::IndexSet;
@ -1189,6 +1190,19 @@ impl FetchResponseListener for ModuleContext {
return Err(NetworkError::Internal("No MIME type".into())); return Err(NetworkError::Internal("No MIME type".into()));
} }
// Step 13.4: Let referrerPolicy be the result of parsing the `Referrer-Policy` header
// given response.
let referrer_policy = meta
.headers
.and_then(|headers| headers.typed_get::<ReferrerPolicyHeader>())
.into();
// Step 13.5: If referrerPolicy is not the empty string, set options's referrer policy
// to referrerPolicy.
if referrer_policy != ReferrerPolicy::EmptyString {
self.options.referrer_policy = referrer_policy;
}
// Step 10. // Step 10.
let (source_text, _, _) = UTF_8.decode(&self.data); let (source_text, _, _) = UTF_8.decode(&self.data);
Ok(ScriptOrigin::external( Ok(ScriptOrigin::external(
@ -1364,7 +1378,7 @@ pub struct ScriptFetchOptions {
#[no_trace] #[no_trace]
pub parser_metadata: ParserMetadata, pub parser_metadata: ParserMetadata,
#[no_trace] #[no_trace]
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
} }
impl ScriptFetchOptions { impl ScriptFetchOptions {
@ -1376,7 +1390,7 @@ impl ScriptFetchOptions {
referrer: global.get_referrer(), referrer: global.get_referrer(),
parser_metadata: ParserMetadata::NotParserInserted, parser_metadata: ParserMetadata::NotParserInserted,
credentials_mode: CredentialsMode::CredentialsSameOrigin, credentials_mode: CredentialsMode::CredentialsSameOrigin,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
} }
} }
@ -1741,6 +1755,7 @@ fn fetch_single_module_script(
.parser_metadata(options.parser_metadata) .parser_metadata(options.parser_metadata)
.integrity_metadata(options.integrity_metadata.clone()) .integrity_metadata(options.integrity_metadata.clone())
.credentials_mode(options.credentials_mode) .credentials_mode(options.credentials_mode)
.referrer_policy(options.referrer_policy)
.mode(mode); .mode(mode);
let context = Arc::new(Mutex::new(ModuleContext { let context = Arc::new(Mutex::new(ModuleContext {

View file

@ -69,7 +69,7 @@ use net_traits::request::{
}; };
use net_traits::storage_thread::StorageType; use net_traits::storage_thread::StorageType;
use net_traits::{ use net_traits::{
FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError, ReferrerPolicy, FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError,
ResourceFetchTiming, ResourceThreads, ResourceTimingType, ResourceFetchTiming, ResourceThreads, ResourceTimingType,
}; };
use percent_encoding::percent_decode; use percent_encoding::percent_decode;
@ -3822,12 +3822,6 @@ impl ScriptThread {
.as_ref() .as_ref()
.map(|referrer| referrer.clone().into_string()); .map(|referrer| referrer.clone().into_string());
let referrer_policy = metadata
.headers
.as_deref()
.and_then(|h| h.typed_get::<ReferrerPolicyHeader>())
.map(ReferrerPolicy::from);
let document = Document::new( let document = Document::new(
&window, &window,
HasBrowsingContext::Yes, HasBrowsingContext::Yes,
@ -3840,11 +3834,18 @@ impl ScriptThread {
DocumentSource::FromParser, DocumentSource::FromParser,
loader, loader,
referrer, referrer,
referrer_policy,
Some(metadata.status.raw_code()), Some(metadata.status.raw_code()),
incomplete.canceller, incomplete.canceller,
can_gc, can_gc,
); );
let referrer_policy = metadata
.headers
.as_deref()
.and_then(|h| h.typed_get::<ReferrerPolicyHeader>())
.into();
document.set_referrer_policy(referrer_policy);
document.set_ready_state(DocumentReadyState::Loading, can_gc); document.set_ready_state(DocumentReadyState::Loading, can_gc);
self.documents self.documents

View file

@ -52,9 +52,8 @@ pub trait StylesheetOwner {
/// trigger a document-load-blocking load). /// trigger a document-load-blocking load).
fn parser_inserted(&self) -> bool; fn parser_inserted(&self) -> bool;
/// Which referrer policy should loads triggered by this owner follow, or /// Which referrer policy should loads triggered by this owner follow
/// `None` for the default. fn referrer_policy(&self) -> ReferrerPolicy;
fn referrer_policy(&self) -> Option<ReferrerPolicy>;
/// Notes that a new load is pending to finish. /// Notes that a new load is pending to finish.
fn increment_pending_loads_count(&self); fn increment_pending_loads_count(&self);
@ -335,9 +334,7 @@ impl<'a> StylesheetLoader<'a> {
.upcast::<Element>() .upcast::<Element>()
.as_stylesheet_owner() .as_stylesheet_owner()
.expect("Stylesheet not loaded by <style> or <link> element!"); .expect("Stylesheet not loaded by <style> or <link> element!");
let referrer_policy = owner let referrer_policy = owner.referrer_policy();
.referrer_policy()
.or_else(|| document.get_referrer_policy());
owner.increment_pending_loads_count(); owner.increment_pending_loads_count();
if owner.parser_inserted() { if owner.parser_inserted() {
document.increment_script_blocking_stylesheet_count(); document.increment_script_blocking_stylesheet_count();
@ -366,7 +363,7 @@ pub(crate) fn stylesheet_fetch_request(
origin: ImmutableOrigin, origin: ImmutableOrigin,
pipeline_id: PipelineId, pipeline_id: PipelineId,
referrer: Referrer, referrer: Referrer,
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
integrity_metadata: String, integrity_metadata: String,
) -> RequestBuilder { ) -> RequestBuilder {
create_a_potential_cors_request(url, Destination::Style, cors_setting, None, referrer) create_a_potential_cors_request(url, Destination::Style, cors_setting, None, referrer)

View file

@ -105,8 +105,10 @@ pub struct CustomResponseMediator {
/// [Policies](https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-states) /// [Policies](https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-states)
/// for providing a referrer header for a request /// for providing a referrer header for a request
#[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, Serialize)] #[derive(Clone, Copy, Debug, Default, Deserialize, MallocSizeOf, PartialEq, Serialize)]
pub enum ReferrerPolicy { pub enum ReferrerPolicy {
/// ""
EmptyString,
/// "no-referrer" /// "no-referrer"
NoReferrer, NoReferrer,
/// "no-referrer-when-downgrade" /// "no-referrer-when-downgrade"
@ -129,6 +131,7 @@ pub enum ReferrerPolicy {
impl Display for ReferrerPolicy { impl Display for ReferrerPolicy {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let string = match self { let string = match self {
ReferrerPolicy::EmptyString => "",
ReferrerPolicy::NoReferrer => "no-referrer", ReferrerPolicy::NoReferrer => "no-referrer",
ReferrerPolicy::NoReferrerWhenDowngrade => "no-referrer-when-downgrade", ReferrerPolicy::NoReferrerWhenDowngrade => "no-referrer-when-downgrade",
ReferrerPolicy::Origin => "origin", ReferrerPolicy::Origin => "origin",
@ -142,9 +145,9 @@ impl Display for ReferrerPolicy {
} }
} }
impl From<ReferrerPolicyHeader> for ReferrerPolicy { impl From<Option<ReferrerPolicyHeader>> for ReferrerPolicy {
fn from(policy: ReferrerPolicyHeader) -> Self { fn from(header: Option<ReferrerPolicyHeader>) -> Self {
match policy { header.map_or(ReferrerPolicy::EmptyString, |policy| match policy {
ReferrerPolicyHeader::NO_REFERRER => ReferrerPolicy::NoReferrer, ReferrerPolicyHeader::NO_REFERRER => ReferrerPolicy::NoReferrer,
ReferrerPolicyHeader::NO_REFERRER_WHEN_DOWNGRADE => { ReferrerPolicyHeader::NO_REFERRER_WHEN_DOWNGRADE => {
ReferrerPolicy::NoReferrerWhenDowngrade ReferrerPolicy::NoReferrerWhenDowngrade
@ -157,7 +160,7 @@ impl From<ReferrerPolicyHeader> for ReferrerPolicy {
ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN => { ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN => {
ReferrerPolicy::StrictOriginWhenCrossOrigin ReferrerPolicy::StrictOriginWhenCrossOrigin
}, },
} })
} }
} }
@ -173,7 +176,7 @@ impl From<ReferrerPolicy> for ReferrerPolicyHeader {
ReferrerPolicy::OriginWhenCrossOrigin => ReferrerPolicyHeader::ORIGIN_WHEN_CROSS_ORIGIN, ReferrerPolicy::OriginWhenCrossOrigin => ReferrerPolicyHeader::ORIGIN_WHEN_CROSS_ORIGIN,
ReferrerPolicy::UnsafeUrl => ReferrerPolicyHeader::UNSAFE_URL, ReferrerPolicy::UnsafeUrl => ReferrerPolicyHeader::UNSAFE_URL,
ReferrerPolicy::StrictOrigin => ReferrerPolicyHeader::STRICT_ORIGIN, ReferrerPolicy::StrictOrigin => ReferrerPolicyHeader::STRICT_ORIGIN,
ReferrerPolicy::StrictOriginWhenCrossOrigin => { ReferrerPolicy::EmptyString | ReferrerPolicy::StrictOriginWhenCrossOrigin => {
ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN
}, },
} }
@ -789,7 +792,7 @@ pub struct Metadata {
pub referrer: Option<ServoUrl>, pub referrer: Option<ServoUrl>,
/// Referrer Policy of the Request used to obtain Response /// Referrer Policy of the Request used to obtain Response
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
/// Performance information for navigation events /// Performance information for navigation events
pub timing: Option<ResourceFetchTiming>, pub timing: Option<ResourceFetchTiming>,
/// True if the request comes from a redirection /// True if the request comes from a redirection
@ -808,7 +811,7 @@ impl Metadata {
status: HttpStatus::default(), status: HttpStatus::default(),
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
timing: None, timing: None,
redirected: false, redirected: false,
} }
@ -833,18 +836,21 @@ impl Metadata {
} }
/// Set the referrer policy associated with the loaded resource. /// Set the referrer policy associated with the loaded resource.
pub fn set_referrer_policy(&mut self, referrer_policy: Option<ReferrerPolicy>) { pub fn set_referrer_policy(&mut self, referrer_policy: ReferrerPolicy) {
if referrer_policy == ReferrerPolicy::EmptyString {
return;
}
if self.headers.is_none() { if self.headers.is_none() {
self.headers = Some(Serde(HeaderMap::new())); self.headers = Some(Serde(HeaderMap::new()));
} }
self.referrer_policy = referrer_policy; self.referrer_policy = referrer_policy;
if let Some(referrer_policy) = referrer_policy {
self.headers self.headers
.as_mut() .as_mut()
.unwrap() .unwrap()
.typed_insert::<ReferrerPolicyHeader>(referrer_policy.into()); .typed_insert::<ReferrerPolicyHeader>(referrer_policy.into());
}
} }
} }

View file

@ -32,20 +32,26 @@ pub struct PolicyContainer {
/// <https://html.spec.whatwg.org/multipage/#policy-container-csp-list> /// <https://html.spec.whatwg.org/multipage/#policy-container-csp-list>
pub csp_list: Option<CspList>, pub csp_list: Option<CspList>,
/// <https://html.spec.whatwg.org/multipage/#policy-container-referrer-policy> /// <https://html.spec.whatwg.org/multipage/#policy-container-referrer-policy>
pub referrer_policy: ReferrerPolicy, referrer_policy: ReferrerPolicy,
// https://html.spec.whatwg.org/multipage/#policy-container-embedder-policy // https://html.spec.whatwg.org/multipage/#policy-container-embedder-policy
// TODO: Embedder Policy // TODO: Embedder Policy
} }
impl PolicyContainer { impl PolicyContainer {
pub fn new(csp_list: Option<CspList>, referrer_policy: Option<ReferrerPolicy>) -> Self {
PolicyContainer {
csp_list,
referrer_policy: referrer_policy.unwrap_or_default(),
}
}
pub fn set_csp_list(&mut self, csp_list: Option<CspList>) { pub fn set_csp_list(&mut self, csp_list: Option<CspList>) {
self.csp_list = csp_list; self.csp_list = csp_list;
} }
pub fn set_referrer_policy(&mut self, referrer_policy: ReferrerPolicy) {
self.referrer_policy = referrer_policy;
}
pub fn get_referrer_policy(&self) -> ReferrerPolicy {
// https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-empty-string
if self.referrer_policy == ReferrerPolicy::EmptyString {
return ReferrerPolicy::default();
}
self.referrer_policy
}
} }

View file

@ -265,7 +265,7 @@ pub struct RequestBuilder {
pub policy_container: RequestPolicyContainer, pub policy_container: RequestPolicyContainer,
// XXXManishearth these should be part of the client object // XXXManishearth these should be part of the client object
pub referrer: Referrer, pub referrer: Referrer,
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
pub pipeline_id: Option<PipelineId>, pub pipeline_id: Option<PipelineId>,
pub redirect_mode: RedirectMode, pub redirect_mode: RedirectMode,
pub integrity_metadata: String, pub integrity_metadata: String,
@ -299,7 +299,7 @@ impl RequestBuilder {
origin: ImmutableOrigin::new_opaque(), origin: ImmutableOrigin::new_opaque(),
policy_container: RequestPolicyContainer::default(), policy_container: RequestPolicyContainer::default(),
referrer, referrer,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
pipeline_id: None, pipeline_id: None,
redirect_mode: RedirectMode::Follow, redirect_mode: RedirectMode::Follow,
integrity_metadata: "".to_owned(), integrity_metadata: "".to_owned(),
@ -372,7 +372,7 @@ impl RequestBuilder {
self self
} }
pub fn referrer_policy(mut self, referrer_policy: Option<ReferrerPolicy>) -> RequestBuilder { pub fn referrer_policy(mut self, referrer_policy: ReferrerPolicy) -> RequestBuilder {
self.referrer_policy = referrer_policy; self.referrer_policy = referrer_policy;
self self
} }
@ -494,7 +494,7 @@ pub struct Request {
/// <https://fetch.spec.whatwg.org/#concept-request-referrer> /// <https://fetch.spec.whatwg.org/#concept-request-referrer>
pub referrer: Referrer, pub referrer: Referrer,
/// <https://fetch.spec.whatwg.org/#concept-request-referrer-policy> /// <https://fetch.spec.whatwg.org/#concept-request-referrer-policy>
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
pub pipeline_id: Option<PipelineId>, pub pipeline_id: Option<PipelineId>,
/// <https://fetch.spec.whatwg.org/#synchronous-flag> /// <https://fetch.spec.whatwg.org/#synchronous-flag>
pub synchronous: bool, pub synchronous: bool,
@ -553,7 +553,7 @@ impl Request {
destination: Destination::None, destination: Destination::None,
origin: origin.unwrap_or(Origin::Client), origin: origin.unwrap_or(Origin::Client),
referrer, referrer,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
pipeline_id, pipeline_id,
synchronous: false, synchronous: false,
mode: RequestMode::NoCors, mode: RequestMode::NoCors,

View file

@ -104,7 +104,7 @@ pub struct Response {
pub cache_state: CacheState, pub cache_state: CacheState,
pub https_state: HttpsState, pub https_state: HttpsState,
pub referrer: Option<ServoUrl>, pub referrer: Option<ServoUrl>,
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
/// [CORS-exposed header-name list](https://fetch.spec.whatwg.org/#concept-response-cors-exposed-header-name-list) /// [CORS-exposed header-name list](https://fetch.spec.whatwg.org/#concept-response-cors-exposed-header-name-list)
pub cors_exposed_header_name_list: Vec<String>, pub cors_exposed_header_name_list: Vec<String>,
/// [Location URL](https://fetch.spec.whatwg.org/#concept-response-location-url) /// [Location URL](https://fetch.spec.whatwg.org/#concept-response-location-url)
@ -135,7 +135,7 @@ impl Response {
cache_state: CacheState::None, cache_state: CacheState::None,
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
cors_exposed_header_name_list: vec![], cors_exposed_header_name_list: vec![],
location_url: None, location_url: None,
internal_response: None, internal_response: None,
@ -166,7 +166,7 @@ impl Response {
cache_state: CacheState::None, cache_state: CacheState::None,
https_state: HttpsState::None, https_state: HttpsState::None,
referrer: None, referrer: None,
referrer_policy: None, referrer_policy: ReferrerPolicy::EmptyString,
cors_exposed_header_name_list: vec![], cors_exposed_header_name_list: vec![],
location_url: None, location_url: None,
internal_response: None, internal_response: None,

View file

@ -155,7 +155,7 @@ pub struct LoadData {
/// The referrer. /// The referrer.
pub referrer: Referrer, pub referrer: Referrer,
/// The referrer policy. /// The referrer policy.
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
/// The source to use instead of a network response for a srcdoc document. /// The source to use instead of a network response for a srcdoc document.
pub srcdoc: String, pub srcdoc: String,
@ -183,7 +183,7 @@ impl LoadData {
url: ServoUrl, url: ServoUrl,
creator_pipeline_id: Option<PipelineId>, creator_pipeline_id: Option<PipelineId>,
referrer: Referrer, referrer: Referrer,
referrer_policy: Option<ReferrerPolicy>, referrer_policy: ReferrerPolicy,
inherited_secure_context: Option<bool>, inherited_secure_context: Option<bool>,
) -> LoadData { ) -> LoadData {
LoadData { LoadData {
@ -846,7 +846,7 @@ pub struct WorkerScriptLoadOrigin {
/// referrer url /// referrer url
pub referrer_url: Option<ServoUrl>, pub referrer_url: Option<ServoUrl>,
/// the referrer policy which is used /// the referrer policy which is used
pub referrer_policy: Option<ReferrerPolicy>, pub referrer_policy: ReferrerPolicy,
/// the pipeline id of the entity requesting the load /// the pipeline id of the entity requesting the load
pub pipeline_id: PipelineId, pub pipeline_id: PipelineId,
} }

View file

@ -30,6 +30,7 @@ use ipc_channel::router::ROUTER;
use keyboard_types::webdriver::send_keys; use keyboard_types::webdriver::send_keys;
use log::{debug, info}; use log::{debug, info};
use net_traits::request::Referrer; use net_traits::request::Referrer;
use net_traits::ReferrerPolicy;
use pixels::PixelFormat; use pixels::PixelFormat;
use script_traits::webdriver_msg::{ use script_traits::webdriver_msg::{
LoadStatus, WebDriverCookieError, WebDriverFrameId, WebDriverJSError, WebDriverJSResult, LoadStatus, WebDriverCookieError, WebDriverFrameId, WebDriverJSError, WebDriverJSResult,
@ -656,7 +657,7 @@ impl Handler {
url, url,
None, None,
Referrer::NoReferrer, Referrer::NoReferrer,
None, ReferrerPolicy::EmptyString,
None, None,
); );
let cmd_msg = WebDriverCommandMsg::LoadUrl( let cmd_msg = WebDriverCommandMsg::LoadUrl(

View file

@ -1,8 +0,0 @@
[referrer-origin.html]
type: testharness
[Request's referrer is origin]
expected: FAIL
[Cross-origin referrer is overridden by client origin]
expected: FAIL

View file

@ -1,19 +0,0 @@
[referrer-no-referrer.sub.html]
[Importing a remote-origin descendant script from a same-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a same-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a same-origin descendant script from a remote-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a remote-origin descendant script from a remote-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a remote-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a same-origin descendant script from a same-origin top-level script with the no-referrer policy.]
expected: FAIL

View file

@ -1,12 +1,6 @@
[referrer-origin.sub.html] [referrer-origin.sub.html]
[Importing a same-origin descendant script from a same-origin top-level script with the origin policy.]
expected: FAIL
[Importing a remote-origin descendant script from a remote-origin top-level script with the origin policy.] [Importing a remote-origin descendant script from a remote-origin top-level script with the origin policy.]
expected: FAIL expected: FAIL
[Importing a same-origin descendant script from a remote-origin top-level script with the origin policy.] [Importing a same-origin descendant script from a remote-origin top-level script with the origin policy.]
expected: FAIL expected: FAIL
[Importing a same-origin top-level script with the origin policy.]
expected: FAIL

View file

@ -2,18 +2,12 @@
[Parent module delivered with `no-referrer-when-downgrade` policy importing a same-origin descendant script.] [Parent module delivered with `no-referrer-when-downgrade` policy importing a same-origin descendant script.]
expected: FAIL expected: FAIL
[Parent module delivered with `origin` policy importing a same-origin descendant script.]
expected: FAIL
[Remote parent module delivered with `origin-when-cross-origin` policy importing a same-origin-to-parent-module descendant script.] [Remote parent module delivered with `origin-when-cross-origin` policy importing a same-origin-to-parent-module descendant script.]
expected: FAIL expected: FAIL
[Remote parent module delivered with `origin-when-cross-origin` policy importing a cross-origin-to-parent-module descendant script.] [Remote parent module delivered with `origin-when-cross-origin` policy importing a cross-origin-to-parent-module descendant script.]
expected: FAIL expected: FAIL
[Parent module delivered with invalid policy importing a same-origin descendant script.]
expected: FAIL
[Parent module delivered with `same-origin` policy importing a same-origin descendant script.] [Parent module delivered with `same-origin` policy importing a same-origin descendant script.]
expected: FAIL expected: FAIL

View file

@ -5,12 +5,5 @@
[Importing a remote-origin descendant script from a remote-origin top-level script with the same-origin policy.] [Importing a remote-origin descendant script from a remote-origin top-level script with the same-origin policy.]
expected: FAIL expected: FAIL
[Importing a remote-origin descendant script from a same-origin top-level script with the same-origin policy.]
expected: FAIL
[Importing a remote-origin top-level script with the same-origin policy.]
expected: FAIL
[Importing a same-origin descendant script from a remote-origin top-level script with the same-origin policy.] [Importing a same-origin descendant script from a remote-origin top-level script with the same-origin policy.]
expected: FAIL expected: FAIL

View file

@ -10,6 +10,3 @@
[Importing a remote-origin descendant script from a same-origin top-level script with the unsafe-url policy.] [Importing a remote-origin descendant script from a same-origin top-level script with the unsafe-url policy.]
expected: FAIL expected: FAIL
[Importing a remote-origin top-level script with the unsafe-url policy.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,24 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,24 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,24 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +1,3 @@
[iframe-inheritance-document-write.html] [iframe-inheritance-document-write.html]
[Referrer Policy: iframes with document.write()] [Referrer Policy: iframes with document.write()]
expected: FAIL expected: FAIL
[document.open() should not change the referrer policy of the opened document.]
expected: FAIL

View file

@ -1,3 +0,0 @@
[meta-referrer-removed-1.http.html]
[removing <meta name="referrer"> should not change referrer policy]
expected: FAIL

View file

@ -1,3 +0,0 @@
[second-meta-referrer-added-before-first.http.html]
[document referrer policy is the value of the most recently added <meta name="referrer">]
expected: FAIL

View file

@ -1,6 +0,0 @@
[referrer-origin.html]
[Request's referrer is origin]
expected: FAIL
[Cross-origin referrer is overridden by client origin]
expected: FAIL

View file

@ -1,18 +0,0 @@
[referrer-no-referrer.sub.html]
[Importing a same-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a remote-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a same-origin descendant script from a same-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a remote-origin descendant script from a same-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a remote-origin descendant script from a remote-origin top-level script with the no-referrer policy.]
expected: FAIL
[Importing a same-origin descendant script from a remote-origin top-level script with the no-referrer policy.]
expected: FAIL

View file

@ -1,10 +1,4 @@
[referrer-origin.sub.html] [referrer-origin.sub.html]
[Importing a same-origin top-level script with the origin policy.]
expected: FAIL
[Importing a same-origin descendant script from a same-origin top-level script with the origin policy.]
expected: FAIL
[Importing a remote-origin descendant script from a remote-origin top-level script with the origin policy.] [Importing a remote-origin descendant script from a remote-origin top-level script with the origin policy.]
expected: FAIL expected: FAIL

View file

@ -2,18 +2,12 @@
[Parent module delivered with `no-referrer-when-downgrade` policy importing a same-origin descendant script.] [Parent module delivered with `no-referrer-when-downgrade` policy importing a same-origin descendant script.]
expected: FAIL expected: FAIL
[Parent module delivered with `origin` policy importing a same-origin descendant script.]
expected: FAIL
[Remote parent module delivered with `origin-when-cross-origin` policy importing a same-origin-to-parent-module descendant script.] [Remote parent module delivered with `origin-when-cross-origin` policy importing a same-origin-to-parent-module descendant script.]
expected: FAIL expected: FAIL
[Remote parent module delivered with `origin-when-cross-origin` policy importing a cross-origin-to-parent-module descendant script.] [Remote parent module delivered with `origin-when-cross-origin` policy importing a cross-origin-to-parent-module descendant script.]
expected: FAIL expected: FAIL
[Parent module delivered with invalid policy importing a same-origin descendant script.]
expected: FAIL
[Parent module delivered with `same-origin` policy importing a same-origin descendant script.] [Parent module delivered with `same-origin` policy importing a same-origin descendant script.]
expected: FAIL expected: FAIL

View file

@ -1,13 +1,7 @@
[referrer-same-origin.sub.html] [referrer-same-origin.sub.html]
[Importing a remote-origin top-level script with the same-origin policy.]
expected: FAIL
[Importing a same-origin descendant script from a same-origin top-level script with the same-origin policy.] [Importing a same-origin descendant script from a same-origin top-level script with the same-origin policy.]
expected: FAIL expected: FAIL
[Importing a remote-origin descendant script from a same-origin top-level script with the same-origin policy.]
expected: FAIL
[Importing a remote-origin descendant script from a remote-origin top-level script with the same-origin policy.] [Importing a remote-origin descendant script from a remote-origin top-level script with the same-origin policy.]
expected: FAIL expected: FAIL

View file

@ -10,6 +10,3 @@
[Importing a same-origin descendant script from a remote-origin top-level script with the unsafe-url policy.] [Importing a same-origin descendant script from a remote-origin top-level script with the unsafe-url policy.]
expected: FAIL expected: FAIL
[Importing a remote-origin top-level script with the unsafe-url policy.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,24 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,25 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,24 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,37 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects omitted for fetch to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for fetch to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,36 +0,0 @@
[script-tag-dynamic-import.http.html]
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to cross-https origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-http origin and swap-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and no-redirect redirection from http context.]
expected: FAIL
[Referrer Policy: Expects omitted for script-tag-dynamic-import to same-https origin and swap-origin redirection from http context.]
expected: FAIL

View file

@ -1,6 +0,0 @@
[fetch.http.html]
[Referrer Policy: Expects origin for fetch to same-http origin and keep-origin redirection from http context.]
expected: FAIL
[Referrer Policy: Expects origin for fetch to same-http origin and no-redirect redirection from http context.]
expected: FAIL

Some files were not shown because too many files have changed in this diff Show more