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::request::{Referrer, RequestBuilder};
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 script_layout_interface::{LayoutFactory, ScriptThreadFactory};
use script_traits::CompositorEvent::{MouseButtonEvent, MouseMoveEvent};
@ -1413,7 +1413,7 @@ where
url,
None,
Referrer::NoReferrer,
None,
ReferrerPolicy::EmptyString,
None,
);
let ctx_id = BrowsingContextId::from(top_level_browsing_context_id);
@ -3033,7 +3033,7 @@ where
url,
None,
Referrer::NoReferrer,
None,
ReferrerPolicy::EmptyString,
None,
);
let sandbox = IFrameSandboxState::IFrameUnsandboxed;

View file

@ -28,8 +28,8 @@ use net_traits::request::{
};
use net_traits::response::{Response, ResponseBody, ResponseType};
use net_traits::{
FetchTaskTarget, NetworkError, ResourceAttribute, ResourceFetchTiming, ResourceTimeValue,
ResourceTimingType,
FetchTaskTarget, NetworkError, ReferrerPolicy, ResourceAttribute, ResourceFetchTiming,
ResourceTimeValue, ResourceTimingType,
};
use rustls::Certificate;
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
// to requests policy containers referrer policy.
request.referrer_policy = request
.referrer_policy
.or(Some(policy_container.referrer_policy));
assert!(request.referrer_policy.is_some());
if request.referrer_policy == ReferrerPolicy::EmptyString {
request.referrer_policy = policy_container.get_referrer_policy();
}
let referrer_url = match mem::replace(&mut request.referrer, Referrer::NoReferrer) {
Referrer::NoReferrer => None,
Referrer::ReferrerUrl(referrer_source) | Referrer::Client(referrer_source) => {
request.headers.remove(header::REFERER);
determine_requests_referrer(
request.referrer_policy.unwrap(),
request.referrer_policy,
referrer_source,
request.current_url(),
)

View file

@ -313,7 +313,7 @@ pub fn determine_requests_referrer(
current_url: ServoUrl,
) -> Option<ServoUrl> {
match referrer_policy {
ReferrerPolicy::NoReferrer => None,
ReferrerPolicy::EmptyString | ReferrerPolicy::NoReferrer => None,
ReferrerPolicy::Origin => strip_url_for_use_as_referrer(referrer_source, true),
ReferrerPolicy::UnsafeUrl => strip_url_for_use_as_referrer(referrer_source, false),
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
let mut response = response.unwrap();
// Step 5
// TODO: Step 5: cross-origin resource policy check
// Step 6
if response
.actual_response()
.status
@ -986,12 +988,12 @@ pub async fn http_redirect_fetch(
ResourceTimeValue::RedirectStart,
)); // 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 {
return Response::network_error(NetworkError::Internal("Too many redirects".into()));
}
// Step 6
// Step 8: Increase requests redirect count by 1.
request.redirect_count += 1;
// Step 7
@ -1002,6 +1004,7 @@ pub async fn http_redirect_fetch(
request.current_url()
),
};
let has_credentials = has_credentials(&location_url);
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 {
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 &&
request.body.as_ref().is_some_and(|b| b.source_is_null())
{
return Response::network_error(NetworkError::Internal("Request body is not done".into()));
}
// Step 10
if cors_flag && location_url.origin() != request.current_url().origin() {
request.origin = Origin::Origin(ImmutableOrigin::new_opaque());
}
// Step 11
// Step 12
if response
.actual_response()
.status
@ -1040,10 +1044,10 @@ pub async fn http_redirect_fetch(
request.method != Method::GET)
})
{
// Step 11.1
// Step 12.1
request.method = Method::GET;
request.body = None;
// Step 11.2
// Step 12.2
for name in &[
CONTENT_ENCODING,
CONTENT_LANGUAGE,
@ -1075,13 +1079,7 @@ pub async fn http_redirect_fetch(
request.url_list.push(location_url);
// Step 19: Invoke set requests referrer policy on redirect on request and internalResponse.
if let Some(referrer_policy) = response
.actual_response()
.headers
.typed_get::<headers::ReferrerPolicy>()
{
request.referrer_policy = Some(referrer_policy.into());
}
set_requests_referrer_policy_on_redirect(request, response.actual_response());
// Step 20: Let recursive be true.
// 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:
if request.mode != RequestMode::CorsMode {
match request.referrer_policy {
Some(ReferrerPolicy::NoReferrer) => {
ReferrerPolicy::NoReferrer => {
// Set serializedOrigin to `null`.
serialized_origin = headers::Origin::NULL;
},
Some(
ReferrerPolicy::NoReferrerWhenDowngrade |
ReferrerPolicy::StrictOrigin |
ReferrerPolicy::StrictOriginWhenCrossOrigin,
) => {
ReferrerPolicy::NoReferrerWhenDowngrade |
ReferrerPolicy::StrictOrigin |
ReferrerPolicy::StrictOriginWhenCrossOrigin => {
// If requests origin is a tuple origin, its scheme is "https", and
// requests current URLs scheme is not "https", then set serializedOrigin to `null`.
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,
// then set serializedOrigin to `null`.
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.
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 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.mode = RequestMode::CorsMode;
let fetch_response = fetch(&mut request, None);

View file

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

View file

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

View file

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

View file

@ -4539,11 +4539,11 @@ pub fn reflect_referrer_policy_attribute(element: &Element) -> DOMString {
DOMString::new()
}
pub(crate) fn referrer_policy_for_element(element: &Element) -> Option<ReferrerPolicy> {
pub(crate) fn referrer_policy_for_element(element: &Element) -> ReferrerPolicy {
element
.get_attribute_by_name(DOMString::from_string(String::from("referrerpolicy")))
.and_then(|attribute: DomRoot<Attr>| determine_policy_for_token(&attribute.Value()))
.or_else(|| document_from_node(element).get_referrer_policy())
.map(|attribute: DomRoot<Attr>| determine_policy_for_token(&attribute.Value()))
.unwrap_or(document_from_node(element).get_referrer_policy())
}
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.
pub fn get_referrer_policy(&self) -> Option<ReferrerPolicy> {
pub fn get_referrer_policy(&self) -> ReferrerPolicy {
if let Some(window) = self.downcast::<Window>() {
let document = window.Document();
@ -2435,7 +2435,7 @@ impl GlobalScope {
if let Some(worker) = self.downcast::<WorkerGlobalScope>() {
let policy_container = worker.policy_container().to_owned();
return Some(policy_container.referrer_policy);
return policy_container.get_referrer_policy();
}
unreachable!();
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -76,7 +76,7 @@ struct PrefetchSink {
#[no_trace]
referrer: Referrer,
#[no_trace]
referrer_policy: Option<ReferrerPolicy>,
referrer_policy: ReferrerPolicy,
#[no_trace]
resource_threads: ResourceThreads,
prefetching: Cell<bool>,
@ -203,10 +203,10 @@ impl PrefetchSink {
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)
.and_then(|attr| determine_policy_for_token(&attr.value))
.or(self.referrer_policy)
.map(|attr| determine_policy_for_token(&attr.value))
.unwrap_or(self.referrer_policy)
}
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)
.use_url_credentials(true)
.origin(global_scope.origin().immutable().clone())
.pipeline_id(Some(self.upcast::<GlobalScope>().pipeline_id()))
.referrer_policy(None);
.pipeline_id(Some(self.upcast::<GlobalScope>().pipeline_id()));
let (url, source) = match fetch::load_whole_resource(
request,

View file

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

View file

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

View file

@ -12,6 +12,7 @@ use std::sync::{Arc, Mutex};
use std::{mem, ptr};
use encoding_rs::UTF_8;
use headers::{HeaderMapExt, ReferrerPolicy as ReferrerPolicyHeader};
use html5ever::local_name;
use hyper_serde::Serde;
use indexmap::IndexSet;
@ -1189,6 +1190,19 @@ impl FetchResponseListener for ModuleContext {
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.
let (source_text, _, _) = UTF_8.decode(&self.data);
Ok(ScriptOrigin::external(
@ -1364,7 +1378,7 @@ pub struct ScriptFetchOptions {
#[no_trace]
pub parser_metadata: ParserMetadata,
#[no_trace]
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_policy: ReferrerPolicy,
}
impl ScriptFetchOptions {
@ -1376,7 +1390,7 @@ impl ScriptFetchOptions {
referrer: global.get_referrer(),
parser_metadata: ParserMetadata::NotParserInserted,
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)
.integrity_metadata(options.integrity_metadata.clone())
.credentials_mode(options.credentials_mode)
.referrer_policy(options.referrer_policy)
.mode(mode);
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::{
FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError, ReferrerPolicy,
FetchMetadata, FetchResponseListener, FetchResponseMsg, Metadata, NetworkError,
ResourceFetchTiming, ResourceThreads, ResourceTimingType,
};
use percent_encoding::percent_decode;
@ -3822,12 +3822,6 @@ impl ScriptThread {
.as_ref()
.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(
&window,
HasBrowsingContext::Yes,
@ -3840,11 +3834,18 @@ impl ScriptThread {
DocumentSource::FromParser,
loader,
referrer,
referrer_policy,
Some(metadata.status.raw_code()),
incomplete.canceller,
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);
self.documents

View file

@ -52,9 +52,8 @@ pub trait StylesheetOwner {
/// trigger a document-load-blocking load).
fn parser_inserted(&self) -> bool;
/// Which referrer policy should loads triggered by this owner follow, or
/// `None` for the default.
fn referrer_policy(&self) -> Option<ReferrerPolicy>;
/// Which referrer policy should loads triggered by this owner follow
fn referrer_policy(&self) -> ReferrerPolicy;
/// Notes that a new load is pending to finish.
fn increment_pending_loads_count(&self);
@ -335,9 +334,7 @@ impl<'a> StylesheetLoader<'a> {
.upcast::<Element>()
.as_stylesheet_owner()
.expect("Stylesheet not loaded by <style> or <link> element!");
let referrer_policy = owner
.referrer_policy()
.or_else(|| document.get_referrer_policy());
let referrer_policy = owner.referrer_policy();
owner.increment_pending_loads_count();
if owner.parser_inserted() {
document.increment_script_blocking_stylesheet_count();
@ -366,7 +363,7 @@ pub(crate) fn stylesheet_fetch_request(
origin: ImmutableOrigin,
pipeline_id: PipelineId,
referrer: Referrer,
referrer_policy: Option<ReferrerPolicy>,
referrer_policy: ReferrerPolicy,
integrity_metadata: String,
) -> RequestBuilder {
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)
/// 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 {
/// ""
EmptyString,
/// "no-referrer"
NoReferrer,
/// "no-referrer-when-downgrade"
@ -129,6 +131,7 @@ pub enum ReferrerPolicy {
impl Display for ReferrerPolicy {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let string = match self {
ReferrerPolicy::EmptyString => "",
ReferrerPolicy::NoReferrer => "no-referrer",
ReferrerPolicy::NoReferrerWhenDowngrade => "no-referrer-when-downgrade",
ReferrerPolicy::Origin => "origin",
@ -142,9 +145,9 @@ impl Display for ReferrerPolicy {
}
}
impl From<ReferrerPolicyHeader> for ReferrerPolicy {
fn from(policy: ReferrerPolicyHeader) -> Self {
match policy {
impl From<Option<ReferrerPolicyHeader>> for ReferrerPolicy {
fn from(header: Option<ReferrerPolicyHeader>) -> Self {
header.map_or(ReferrerPolicy::EmptyString, |policy| match policy {
ReferrerPolicyHeader::NO_REFERRER => ReferrerPolicy::NoReferrer,
ReferrerPolicyHeader::NO_REFERRER_WHEN_DOWNGRADE => {
ReferrerPolicy::NoReferrerWhenDowngrade
@ -157,7 +160,7 @@ impl From<ReferrerPolicyHeader> for ReferrerPolicy {
ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN => {
ReferrerPolicy::StrictOriginWhenCrossOrigin
},
}
})
}
}
@ -173,7 +176,7 @@ impl From<ReferrerPolicy> for ReferrerPolicyHeader {
ReferrerPolicy::OriginWhenCrossOrigin => ReferrerPolicyHeader::ORIGIN_WHEN_CROSS_ORIGIN,
ReferrerPolicy::UnsafeUrl => ReferrerPolicyHeader::UNSAFE_URL,
ReferrerPolicy::StrictOrigin => ReferrerPolicyHeader::STRICT_ORIGIN,
ReferrerPolicy::StrictOriginWhenCrossOrigin => {
ReferrerPolicy::EmptyString | ReferrerPolicy::StrictOriginWhenCrossOrigin => {
ReferrerPolicyHeader::STRICT_ORIGIN_WHEN_CROSS_ORIGIN
},
}
@ -789,7 +792,7 @@ pub struct Metadata {
pub referrer: Option<ServoUrl>,
/// Referrer Policy of the Request used to obtain Response
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_policy: ReferrerPolicy,
/// Performance information for navigation events
pub timing: Option<ResourceFetchTiming>,
/// True if the request comes from a redirection
@ -808,7 +811,7 @@ impl Metadata {
status: HttpStatus::default(),
https_state: HttpsState::None,
referrer: None,
referrer_policy: None,
referrer_policy: ReferrerPolicy::EmptyString,
timing: None,
redirected: false,
}
@ -833,18 +836,21 @@ impl Metadata {
}
/// 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() {
self.headers = Some(Serde(HeaderMap::new()));
}
self.referrer_policy = referrer_policy;
if let Some(referrer_policy) = referrer_policy {
self.headers
.as_mut()
.unwrap()
.typed_insert::<ReferrerPolicyHeader>(referrer_policy.into());
}
self.headers
.as_mut()
.unwrap()
.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>
pub csp_list: Option<CspList>,
/// <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
// TODO: Embedder Policy
}
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>) {
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,
// XXXManishearth these should be part of the client object
pub referrer: Referrer,
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_policy: ReferrerPolicy,
pub pipeline_id: Option<PipelineId>,
pub redirect_mode: RedirectMode,
pub integrity_metadata: String,
@ -299,7 +299,7 @@ impl RequestBuilder {
origin: ImmutableOrigin::new_opaque(),
policy_container: RequestPolicyContainer::default(),
referrer,
referrer_policy: None,
referrer_policy: ReferrerPolicy::EmptyString,
pipeline_id: None,
redirect_mode: RedirectMode::Follow,
integrity_metadata: "".to_owned(),
@ -372,7 +372,7 @@ impl RequestBuilder {
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
}
@ -494,7 +494,7 @@ pub struct Request {
/// <https://fetch.spec.whatwg.org/#concept-request-referrer>
pub referrer: Referrer,
/// <https://fetch.spec.whatwg.org/#concept-request-referrer-policy>
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_policy: ReferrerPolicy,
pub pipeline_id: Option<PipelineId>,
/// <https://fetch.spec.whatwg.org/#synchronous-flag>
pub synchronous: bool,
@ -553,7 +553,7 @@ impl Request {
destination: Destination::None,
origin: origin.unwrap_or(Origin::Client),
referrer,
referrer_policy: None,
referrer_policy: ReferrerPolicy::EmptyString,
pipeline_id,
synchronous: false,
mode: RequestMode::NoCors,

View file

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

View file

@ -155,7 +155,7 @@ pub struct LoadData {
/// The referrer.
pub referrer: Referrer,
/// 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.
pub srcdoc: String,
@ -183,7 +183,7 @@ impl LoadData {
url: ServoUrl,
creator_pipeline_id: Option<PipelineId>,
referrer: Referrer,
referrer_policy: Option<ReferrerPolicy>,
referrer_policy: ReferrerPolicy,
inherited_secure_context: Option<bool>,
) -> LoadData {
LoadData {
@ -846,7 +846,7 @@ pub struct WorkerScriptLoadOrigin {
/// referrer url
pub referrer_url: Option<ServoUrl>,
/// the referrer policy which is used
pub referrer_policy: Option<ReferrerPolicy>,
pub referrer_policy: ReferrerPolicy,
/// the pipeline id of the entity requesting the load
pub pipeline_id: PipelineId,
}

View file

@ -30,6 +30,7 @@ use ipc_channel::router::ROUTER;
use keyboard_types::webdriver::send_keys;
use log::{debug, info};
use net_traits::request::Referrer;
use net_traits::ReferrerPolicy;
use pixels::PixelFormat;
use script_traits::webdriver_msg::{
LoadStatus, WebDriverCookieError, WebDriverFrameId, WebDriverJSError, WebDriverJSResult,
@ -656,7 +657,7 @@ impl Handler {
url,
None,
Referrer::NoReferrer,
None,
ReferrerPolicy::EmptyString,
None,
);
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]
[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.]
expected: FAIL
[Importing a same-origin descendant script from a remote-origin top-level script with the origin policy.]
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.]
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.]
expected: FAIL
[Remote parent module delivered with `origin-when-cross-origin` policy importing a cross-origin-to-parent-module descendant script.]
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.]
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.]
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.]
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.]
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]
[Referrer Policy: iframes with document.write()]
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]
[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.]
expected: FAIL

View file

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

View file

@ -1,13 +1,7 @@
[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.]
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.]
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.]
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