mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Fix mode
and credential-mode
for fetching classic worker script
Ref to step 1 in https://html.spec.whatwg.org/multipage/#fetch-a-classic-script
This commit is contained in:
parent
81f750afa7
commit
ffdcd3aa7a
2 changed files with 10 additions and 3 deletions
|
@ -37,7 +37,7 @@ use js::jsapi::{JSAutoCompartment, JSContext};
|
||||||
use js::jsval::UndefinedValue;
|
use js::jsval::UndefinedValue;
|
||||||
use js::rust::HandleValue;
|
use js::rust::HandleValue;
|
||||||
use msg::constellation_msg::{PipelineId, TopLevelBrowsingContextId};
|
use msg::constellation_msg::{PipelineId, TopLevelBrowsingContextId};
|
||||||
use net_traits::request::{CredentialsMode, Destination, Referrer, RequestBuilder};
|
use net_traits::request::{CredentialsMode, Destination, Referrer, RequestBuilder, RequestMode};
|
||||||
use net_traits::IpcSend;
|
use net_traits::IpcSend;
|
||||||
use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
use script_traits::{TimerEvent, TimerSource, WorkerGlobalScopeInit, WorkerScriptLoadOrigin};
|
||||||
use servo_rand::random;
|
use servo_rand::random;
|
||||||
|
@ -310,7 +310,8 @@ impl DedicatedWorkerGlobalScope {
|
||||||
|
|
||||||
let request = RequestBuilder::new(worker_url.clone())
|
let request = RequestBuilder::new(worker_url.clone())
|
||||||
.destination(Destination::Worker)
|
.destination(Destination::Worker)
|
||||||
.credentials_mode(CredentialsMode::Include)
|
.mode(RequestMode::SameOrigin)
|
||||||
|
.credentials_mode(CredentialsMode::CredentialsSameOrigin)
|
||||||
.use_url_credentials(true)
|
.use_url_credentials(true)
|
||||||
.pipeline_id(pipeline_id)
|
.pipeline_id(pipeline_id)
|
||||||
.referrer(referrer)
|
.referrer(referrer)
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
[same-origin.html]
|
[same-origin.html]
|
||||||
type: testharness
|
type: testharness
|
||||||
disabled: intermittent failures
|
expected: TIMEOUT
|
||||||
|
[unsupported_scheme]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
[about_blank]
|
||||||
|
expected: TIMEOUT
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue