Auto merge of #15784 - jdm:ssltests, r=nox,jgraham

Make SSL tests work

These changes fix #6919.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15784)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-06 05:53:14 -05:00 committed by GitHub
commit f3fd8238ce
962 changed files with 586 additions and 3747 deletions

3
Cargo.lock generated
View file

@ -1687,6 +1687,7 @@ dependencies = [
"hyper_serde 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "hyper_serde 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"immeta 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "immeta 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"ipc-channel 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", "matches 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
"mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "mime 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1694,6 +1695,7 @@ dependencies = [
"msg 0.0.1", "msg 0.0.1",
"net_traits 0.0.1", "net_traits 0.0.1",
"openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.9.10 (registry+https://github.com/rust-lang/crates.io-index)",
"parse-hosts 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"profile_traits 0.0.1", "profile_traits 0.0.1",
"serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1760,7 +1762,6 @@ dependencies = [
"log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
"msg 0.0.1", "msg 0.0.1",
"num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"parse-hosts 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 0.9.11 (registry+https://github.com/rust-lang/crates.io-index)",
"servo_config 0.0.1", "servo_config 0.0.1",

View file

@ -230,6 +230,9 @@ pub struct Opts {
/// Print the version and exit. /// Print the version and exit.
pub is_printing_version: bool, pub is_printing_version: bool,
/// Path to SSL certificates.
pub certificate_path: Option<String>,
} }
fn print_usage(app: &str, opts: &Options) { fn print_usage(app: &str, opts: &Options) {
@ -566,6 +569,7 @@ pub fn default_opts() -> Opts {
webrender_record: false, webrender_record: false,
precache_shaders: false, precache_shaders: false,
signpost: false, signpost: false,
certificate_path: None,
} }
} }
@ -615,6 +619,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
"A comma-separated string of debug options. Pass help to show available options.", ""); "A comma-separated string of debug options. Pass help to show available options.", "");
opts.optflag("h", "help", "Print this message"); opts.optflag("h", "help", "Print this message");
opts.optopt("", "resources-path", "Path to find static resources", "/home/servo/resources"); opts.optopt("", "resources-path", "Path to find static resources", "/home/servo/resources");
opts.optopt("", "certificate-path", "Path to find SSL certificates", "/home/servo/resources/certs");
opts.optopt("", "content-process" , "Run as a content process and connect to the given pipe", opts.optopt("", "content-process" , "Run as a content process and connect to the given pipe",
"servo-ipc-channel.abcdefg"); "servo-ipc-channel.abcdefg");
opts.optmulti("", "pref", opts.optmulti("", "pref",
@ -868,6 +873,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
webrender_record: debug_options.webrender_record, webrender_record: debug_options.webrender_record,
precache_shaders: debug_options.precache_shaders, precache_shaders: debug_options.precache_shaders,
signpost: debug_options.signpost, signpost: debug_options.signpost,
certificate_path: opt_match.opt_str("certificate-path"),
}; };
set_defaults(opts); set_defaults(opts);

View file

@ -20,6 +20,7 @@ hyper_serde = "0.6"
hyper-openssl = "0.2.2" hyper-openssl = "0.2.2"
immeta = "0.3.1" immeta = "0.3.1"
ipc-channel = "0.7" ipc-channel = "0.7"
lazy_static = "0.2"
log = "0.3.5" log = "0.3.5"
matches = "0.1" matches = "0.1"
mime = "0.2.1" mime = "0.2.1"
@ -27,6 +28,7 @@ mime_guess = "1.8.0"
msg = {path = "../msg"} msg = {path = "../msg"}
net_traits = {path = "../net_traits"} net_traits = {path = "../net_traits"}
openssl = "0.9" openssl = "0.9"
parse-hosts = "0.3.0"
profile_traits = {path = "../profile_traits"} profile_traits = {path = "../profile_traits"}
serde = "0.9" serde = "0.9"
serde_derive = "0.9" serde_derive = "0.9"

View file

@ -2,21 +2,56 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use hosts::replace_host;
use hyper::client::Pool; use hyper::client::Pool;
use hyper::net::HttpsConnector; use hyper::error::{Result as HyperResult, Error as HyperError};
use hyper::net::{NetworkConnector, HttpsStream, HttpStream, SslClient};
use hyper_openssl::OpensslClient; use hyper_openssl::OpensslClient;
use openssl::ssl::{SSL_OP_NO_COMPRESSION, SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3}; use openssl::ssl::{SSL_OP_NO_COMPRESSION, SSL_OP_NO_SSLV2, SSL_OP_NO_SSLV3};
use openssl::ssl::{SslConnectorBuilder, SslMethod}; use openssl::ssl::{SslConnectorBuilder, SslMethod};
use servo_config::resource_files::resources_dir_path; use std::io;
use std::net::TcpStream;
use std::path::PathBuf;
use std::sync::Arc; use std::sync::Arc;
pub type Connector = HttpsConnector<OpensslClient>; pub struct HttpsConnector {
ssl: OpensslClient,
}
pub fn create_ssl_client(certificate_file: &str) -> OpensslClient { impl HttpsConnector {
let ca_file = &resources_dir_path() fn new(ssl: OpensslClient) -> HttpsConnector {
.expect("Need certificate file to make network requests") HttpsConnector {
.join(certificate_file); ssl: ssl,
}
}
}
impl NetworkConnector for HttpsConnector {
type Stream = HttpsStream<<OpensslClient as SslClient>::Stream>;
fn connect(&self, host: &str, port: u16, scheme: &str) -> HyperResult<Self::Stream> {
if scheme != "http" && scheme != "https" {
return Err(HyperError::Io(io::Error::new(io::ErrorKind::InvalidInput,
"Invalid scheme for Http")));
}
// Perform host replacement when making the actual TCP connection.
let addr = &(&*replace_host(host), port);
let stream = HttpStream(try!(TcpStream::connect(addr)));
if scheme == "http" {
Ok(HttpsStream::Http(stream))
} else {
// Do not perform host replacement on the host that is used
// for verifying any SSL certificate encountered.
self.ssl.wrap_client(stream, host).map(HttpsStream::Https)
}
}
}
pub type Connector = HttpsConnector;
pub fn create_ssl_client(ca_file: &PathBuf) -> OpensslClient {
let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap(); let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
{ {
let context = ssl_connector_builder.builder_mut(); let context = ssl_connector_builder.builder_mut();

View file

@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use parse_hosts::HostsFile; use parse_hosts::HostsFile;
use servo_url::ServoUrl;
use std::borrow::Cow; use std::borrow::Cow;
use std::collections::HashMap; use std::collections::HashMap;
use std::env; use std::env;
@ -62,19 +61,3 @@ pub fn replace_host(host: &str) -> Cow<str> {
.and_then(|table| table.get(host)) .and_then(|table| table.get(host))
.map_or(host.into(), |replaced_host| replaced_host.to_string().into()) .map_or(host.into(), |replaced_host| replaced_host.to_string().into())
} }
pub fn replace_host_in_url(url: ServoUrl) -> ServoUrl {
if let Some(table) = HOST_TABLE.lock().unwrap().as_ref() {
host_replacement(table, url)
} else {
url
}
}
pub fn host_replacement(host_table: &HashMap<String, IpAddr>, mut url: ServoUrl) -> ServoUrl {
let replacement = url.domain().and_then(|domain| host_table.get(domain));
if let Some(ip) = replacement {
url.set_ip_host(*ip).unwrap();
}
url
}

View file

@ -15,7 +15,6 @@ use hsts::HstsList;
use hyper::Error as HttpError; use hyper::Error as HttpError;
use hyper::LanguageTag; use hyper::LanguageTag;
use hyper::client::{Pool, Request as HyperRequest, Response as HyperResponse}; use hyper::client::{Pool, Request as HyperRequest, Response as HyperResponse};
use hyper::client::pool::PooledStream;
use hyper::header::{Accept, AccessControlAllowCredentials, AccessControlAllowHeaders}; use hyper::header::{Accept, AccessControlAllowCredentials, AccessControlAllowHeaders};
use hyper::header::{AccessControlAllowMethods, AccessControlAllowOrigin}; use hyper::header::{AccessControlAllowMethods, AccessControlAllowOrigin};
use hyper::header::{AccessControlMaxAge, AccessControlRequestHeaders}; use hyper::header::{AccessControlMaxAge, AccessControlRequestHeaders};
@ -27,14 +26,11 @@ use hyper::header::{IfUnmodifiedSince, IfModifiedSince, IfNoneMatch, Location};
use hyper::header::{Pragma, Quality, QualityItem, Referer, SetCookie}; use hyper::header::{Pragma, Quality, QualityItem, Referer, SetCookie};
use hyper::header::{UserAgent, q, qitem}; use hyper::header::{UserAgent, q, qitem};
use hyper::method::Method; use hyper::method::Method;
use hyper::net::{Fresh, HttpStream, HttpsStream, NetworkConnector};
use hyper::status::StatusCode; use hyper::status::StatusCode;
use hyper_openssl::SslStream;
use hyper_serde::Serde; use hyper_serde::Serde;
use log; use log;
use msg::constellation_msg::PipelineId; use msg::constellation_msg::PipelineId;
use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy}; use net_traits::{CookieSource, FetchMetadata, NetworkError, ReferrerPolicy};
use net_traits::hosts::replace_host;
use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin}; use net_traits::request::{CacheMode, CredentialsMode, Destination, Origin};
use net_traits::request::{RedirectMode, Referrer, Request, RequestMode}; use net_traits::request::{RedirectMode, Referrer, Request, RequestMode};
use net_traits::request::{ResponseTainting, Type}; use net_traits::request::{ResponseTainting, Type};
@ -121,29 +117,6 @@ impl WrappedHttpResponse {
} }
} }
struct NetworkHttpRequestFactory {
pub connector: Arc<Pool<Connector>>,
}
impl NetworkConnector for NetworkHttpRequestFactory {
type Stream = PooledStream<HttpsStream<SslStream<HttpStream>>>;
fn connect(&self, host: &str, port: u16, scheme: &str) -> Result<Self::Stream, HttpError> {
self.connector.connect(&replace_host(host), port, scheme)
}
}
impl NetworkHttpRequestFactory {
fn create(&self, url: ServoUrl, method: Method, headers: Headers)
-> Result<HyperRequest<Fresh>, NetworkError> {
let connection = HyperRequest::with_connector(method, url.clone().into_url(), self);
let mut request = connection.map_err(|e| NetworkError::from_hyper_error(&url, e))?;
*request.headers_mut() = headers;
Ok(request)
}
}
// Step 3 of https://fetch.spec.whatwg.org/#concept-fetch. // Step 3 of https://fetch.spec.whatwg.org/#concept-fetch.
pub fn set_default_accept(type_: Type, destination: Destination, headers: &mut Headers) { pub fn set_default_accept(type_: Type, destination: Destination, headers: &mut Headers) {
if headers.has::<Accept>() { if headers.has::<Accept>() {
@ -416,7 +389,7 @@ fn auth_from_cache(auth_cache: &RwLock<AuthCache>, origin: &ImmutableOrigin) ->
} }
} }
fn obtain_response(request_factory: &NetworkHttpRequestFactory, fn obtain_response(connector: Arc<Pool<Connector>>,
url: &ServoUrl, url: &ServoUrl,
method: &Method, method: &Method,
request_headers: &Headers, request_headers: &Headers,
@ -467,8 +440,14 @@ fn obtain_response(request_factory: &NetworkHttpRequestFactory,
let connect_start = precise_time_ms(); let connect_start = precise_time_ms();
let request = try!(request_factory.create(url.clone(), method.clone(), let request = HyperRequest::with_connector(method.clone(),
headers.clone())); url.clone().into_url(),
&*connector);
let mut request = match request {
Ok(request) => request,
Err(e) => return Err(NetworkError::from_hyper_error(&url, e)),
};
*request.headers_mut() = headers.clone();
let connect_end = precise_time_ms(); let connect_end = precise_time_ms();
@ -1090,10 +1069,6 @@ fn http_network_fetch(request: &Request,
// TODO be able to tell if the connection is a failure // TODO be able to tell if the connection is a failure
// Step 4 // Step 4
let factory = NetworkHttpRequestFactory {
connector: context.connector.clone(),
};
let url = request.current_url(); let url = request.current_url();
let request_id = context.devtools_chan.as_ref().map(|_| { let request_id = context.devtools_chan.as_ref().map(|_| {
@ -1104,7 +1079,7 @@ fn http_network_fetch(request: &Request,
// do not. Once we support other kinds of fetches we'll need to be more fine grained here // do not. Once we support other kinds of fetches we'll need to be more fine grained here
// since things like image fetches are classified differently by devtools // since things like image fetches are classified differently by devtools
let is_xhr = request.destination == Destination::None; let is_xhr = request.destination == Destination::None;
let wrapped_response = obtain_response(&factory, &url, &request.method, let wrapped_response = obtain_response(context.connector.clone(), &url, &request.method,
&request.headers, &request.headers,
&request.body, &request.method, &request.body, &request.method,
&request.pipeline_id, request.redirect_count + 1, &request.pipeline_id, request.redirect_count + 1,

View file

@ -16,6 +16,8 @@ extern crate hyper_openssl;
extern crate hyper_serde; extern crate hyper_serde;
extern crate immeta; extern crate immeta;
extern crate ipc_channel; extern crate ipc_channel;
#[macro_use]
extern crate lazy_static;
#[macro_use] extern crate log; #[macro_use] extern crate log;
#[macro_use] #[no_link] extern crate matches; #[macro_use] #[no_link] extern crate matches;
#[macro_use] #[macro_use]
@ -24,6 +26,7 @@ extern crate mime_guess;
extern crate msg; extern crate msg;
extern crate net_traits; extern crate net_traits;
extern crate openssl; extern crate openssl;
extern crate parse_hosts;
extern crate profile_traits; extern crate profile_traits;
extern crate serde; extern crate serde;
#[macro_use] #[macro_use]
@ -47,6 +50,7 @@ pub mod cookie;
pub mod cookie_storage; pub mod cookie_storage;
mod data_loader; mod data_loader;
pub mod filemanager_thread; pub mod filemanager_thread;
mod hosts;
pub mod hsts; pub mod hsts;
mod http_loader; mod http_loader;
pub mod image_cache; pub mod image_cache;
@ -65,4 +69,5 @@ pub mod fetch {
pub mod test { pub mod test {
pub use chrome_loader::resolve_chrome_url; pub use chrome_loader::resolve_chrome_url;
pub use http_loader::HttpState; pub use http_loader::HttpState;
pub use hosts::{replace_host_table, parse_hostsfile};
} }

View file

@ -25,6 +25,8 @@ use net_traits::storage_thread::StorageThreadMsg;
use profile_traits::time::ProfilerChan; use profile_traits::time::ProfilerChan;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_json; use serde_json;
use servo_config::opts;
use servo_config::resource_files::resources_dir_path;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::borrow::{Cow, ToOwned}; use std::borrow::{Cow, ToOwned};
use std::collections::HashMap; use std::collections::HashMap;
@ -108,13 +110,21 @@ fn create_resource_groups(config_dir: Option<&Path>)
auth_cache: RwLock::new(auth_cache), auth_cache: RwLock::new(auth_cache),
hsts_list: RwLock::new(hsts_list), hsts_list: RwLock::new(hsts_list),
}; };
let ssl_client = create_ssl_client("certs");
let ca_file = match opts::get().certificate_path {
Some(ref path) => PathBuf::from(path),
None => resources_dir_path()
.expect("Need certificate file to make network requests")
.join("certs"),
};
let ssl_client = create_ssl_client(&ca_file);
let resource_group = ResourceGroup { let resource_group = ResourceGroup {
http_state: Arc::new(http_state), http_state: Arc::new(http_state),
ssl_client: ssl_client.clone(), ssl_client: ssl_client.clone(),
connector: create_http_connector(ssl_client.clone()), connector: create_http_connector(ssl_client.clone()),
}; };
let private_ssl_client = create_ssl_client("certs"); let private_ssl_client = create_ssl_client(&ca_file);
let private_resource_group = ResourceGroup { let private_resource_group = ResourceGroup {
http_state: Arc::new(HttpState::new()), http_state: Arc::new(HttpState::new()),
ssl_client: private_ssl_client.clone(), ssl_client: private_ssl_client.clone(),

View file

@ -4,6 +4,7 @@
use cookie::Cookie; use cookie::Cookie;
use fetch::methods::{should_be_blocked_due_to_bad_port, should_be_blocked_due_to_nosniff}; use fetch::methods::{should_be_blocked_due_to_bad_port, should_be_blocked_due_to_nosniff};
use hosts::replace_host;
use http_loader::{HttpState, is_redirect_status, set_default_accept}; use http_loader::{HttpState, is_redirect_status, set_default_accept};
use http_loader::{set_default_accept_language, set_request_cookies}; use http_loader::{set_default_accept_language, set_request_cookies};
use hyper::buffer::BufReader; use hyper::buffer::BufReader;
@ -16,7 +17,6 @@ use hyper::status::StatusCode;
use hyper::version::HttpVersion; use hyper::version::HttpVersion;
use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, WebSocketConnectData}; use net_traits::{CookieSource, MessageData, NetworkError, WebSocketCommunicate, WebSocketConnectData};
use net_traits::{WebSocketDomAction, WebSocketNetworkEvent}; use net_traits::{WebSocketDomAction, WebSocketNetworkEvent};
use net_traits::hosts::replace_host;
use net_traits::request::{Destination, Type}; use net_traits::request::{Destination, Type};
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::ascii::AsciiExt; use std::ascii::AsciiExt;

View file

@ -22,7 +22,6 @@ lazy_static = "0.2"
log = "0.3.5" log = "0.3.5"
msg = {path = "../msg"} msg = {path = "../msg"}
num-traits = "0.1.32" num-traits = "0.1.32"
parse-hosts = "0.3.0"
serde = "0.9" serde = "0.9"
serde_derive = "0.9" serde_derive = "0.9"
servo_config = {path = "../config", features = ["servo"]} servo_config = {path = "../config", features = ["servo"]}

View file

@ -22,7 +22,6 @@ extern crate lazy_static;
extern crate log; extern crate log;
extern crate msg; extern crate msg;
extern crate num_traits; extern crate num_traits;
extern crate parse_hosts;
extern crate serde; extern crate serde;
#[macro_use] #[macro_use]
extern crate serde_derive; extern crate serde_derive;
@ -51,7 +50,6 @@ use storage_thread::StorageThreadMsg;
pub mod blob_url_store; pub mod blob_url_store;
pub mod filemanager_thread; pub mod filemanager_thread;
pub mod hosts;
pub mod image_cache; pub mod image_cache;
pub mod net_error_list; pub mod net_error_list;
pub mod pub_domains; pub mod pub_domains;

View file

@ -530,7 +530,8 @@ fn test_fetch_with_hsts() {
//takes an address and something that implements hyper::net::Ssl //takes an address and something that implements hyper::net::Ssl
let mut server = Server::https("0.0.0.0:0", ssl).unwrap().handle_threads(handler, 1).unwrap(); let mut server = Server::https("0.0.0.0:0", ssl).unwrap().handle_threads(handler, 1).unwrap();
let ssl_client = create_ssl_client("self_signed_certificate_for_testing.crt"); let ca_file = resources_dir_path().unwrap().join("self_signed_certificate_for_testing.crt");
let ssl_client = create_ssl_client(&ca_file);
let connector = create_http_connector(ssl_client); let connector = create_http_connector(ssl_client);
let context = FetchContext { let context = FetchContext {

View file

@ -6,7 +6,6 @@ use net::hsts::{HstsEntry, HstsList};
use net_traits::IncludeSubdomains; use net_traits::IncludeSubdomains;
use std::collections::HashMap; use std::collections::HashMap;
use time; use time;
use url::Url;
#[test] #[test]
fn test_hsts_entry_is_not_expired_when_it_has_no_timestamp() { fn test_hsts_entry_is_not_expired_when_it_has_no_timestamp() {

View file

@ -25,8 +25,8 @@ use msg::constellation_msg::TEST_PIPELINE_ID;
use net::cookie::Cookie; use net::cookie::Cookie;
use net::cookie_storage::CookieStorage; use net::cookie_storage::CookieStorage;
use net::resource_thread::AuthCacheEntry; use net::resource_thread::AuthCacheEntry;
use net::test::replace_host_table;
use net_traits::{CookieSource, NetworkError}; use net_traits::{CookieSource, NetworkError};
use net_traits::hosts::replace_host_table;
use net_traits::request::{Request, RequestInit, RequestMode, CredentialsMode, Destination}; use net_traits::request::{Request, RequestInit, RequestMode, CredentialsMode, Destination};
use net_traits::response::ResponseBody; use net_traits::response::ResponseBody;
use new_fetch_context; use new_fetch_context;

View file

@ -42,6 +42,7 @@ use net::test::HttpState;
use net_traits::FetchTaskTarget; use net_traits::FetchTaskTarget;
use net_traits::request::Request; use net_traits::request::Request;
use net_traits::response::Response; use net_traits::response::Response;
use servo_config::resource_files::resources_dir_path;
use servo_url::ServoUrl; use servo_url::ServoUrl;
use std::sync::Arc; use std::sync::Arc;
use std::sync::mpsc::{Sender, channel}; use std::sync::mpsc::{Sender, channel};
@ -53,7 +54,8 @@ struct FetchResponseCollector {
} }
fn new_fetch_context(dc: Option<Sender<DevtoolsControlMsg>>) -> FetchContext { fn new_fetch_context(dc: Option<Sender<DevtoolsControlMsg>>) -> FetchContext {
let ssl_client = create_ssl_client("certs"); let ca_file = resources_dir_path().unwrap().join("certs");
let ssl_client = create_ssl_client(&ca_file);
let connector = create_http_connector(ssl_client); let connector = create_http_connector(ssl_client);
FetchContext { FetchContext {
state: Arc::new(HttpState::new()), state: Arc::new(HttpState::new()),

View file

@ -4,12 +4,9 @@
use ipc_channel::ipc; use ipc_channel::ipc;
use net::resource_thread::new_core_resource_thread; use net::resource_thread::new_core_resource_thread;
use net::test::parse_hostsfile;
use net_traits::CoreResourceMsg; use net_traits::CoreResourceMsg;
use net_traits::hosts::{host_replacement, parse_hostsfile};
use profile_traits::time::ProfilerChan; use profile_traits::time::ProfilerChan;
use servo_url::ServoUrl;
use std::borrow::ToOwned;
use std::collections::HashMap;
use std::net::IpAddr; use std::net::IpAddr;
fn ip(s: &str) -> IpAddr { fn ip(s: &str) -> IpAddr {
@ -143,19 +140,3 @@ fn test_parse_hostsfile_with_end_of_line_whitespace()
assert_eq!(ip("2001:db8:0:0:0:ff00:42:8329"), *hosts_table.get("moz.foo.com").unwrap()); assert_eq!(ip("2001:db8:0:0:0:ff00:42:8329"), *hosts_table.get("moz.foo.com").unwrap());
assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap()); assert_eq!(ip("127.0.0.2"), *hosts_table.get("servo.test.server").unwrap());
} }
#[test]
fn test_replace_hosts() {
let mut host_table = HashMap::new();
host_table.insert("foo.bar.com".to_owned(), ip("127.0.0.1"));
host_table.insert("servo.test.server".to_owned(), ip("127.0.0.2"));
let url = ServoUrl::parse("http://foo.bar.com:8000/foo").unwrap();
assert_eq!(host_replacement(&host_table, url).host_str().unwrap(), "127.0.0.1");
let url = ServoUrl::parse("http://servo.test.server").unwrap();
assert_eq!(host_replacement(&host_table, url).host_str().unwrap(), "127.0.0.2");
let url = ServoUrl::parse("http://a.foo.bar.com").unwrap();
assert_eq!(host_replacement(&host_table, url).host_str().unwrap(), "a.foo.bar.com");
}

View file

@ -32,7 +32,8 @@ def browser_kwargs(**kwargs):
"debug_info": kwargs["debug_info"], "debug_info": kwargs["debug_info"],
"binary_args": kwargs["binary_args"], "binary_args": kwargs["binary_args"],
"user_stylesheets": kwargs.get("user_stylesheets"), "user_stylesheets": kwargs.get("user_stylesheets"),
"render_backend": kwargs.get("servo_backend")} "render_backend": kwargs.get("servo_backend"),
"ca_certificate_path": kwargs["ssl_env"].ca_cert_path()}
def executor_kwargs(test_type, server_config, cache_manager, run_info_data, def executor_kwargs(test_type, server_config, cache_manager, run_info_data,
@ -65,17 +66,19 @@ def render_arg(render_backend):
class ServoBrowser(NullBrowser): class ServoBrowser(NullBrowser):
def __init__(self, logger, binary, debug_info=None, binary_args=None, def __init__(self, logger, binary, debug_info=None, binary_args=None,
user_stylesheets=None, render_backend="webrender"): user_stylesheets=None, render_backend="webrender", ca_certificate_path=None):
NullBrowser.__init__(self, logger) NullBrowser.__init__(self, logger)
self.binary = binary self.binary = binary
self.debug_info = debug_info self.debug_info = debug_info
self.binary_args = binary_args or [] self.binary_args = binary_args or []
self.user_stylesheets = user_stylesheets or [] self.user_stylesheets = user_stylesheets or []
self.render_backend = render_backend self.render_backend = render_backend
self.ca_certificate_path = ca_certificate_path
def executor_browser(self): def executor_browser(self):
return ExecutorBrowser, {"binary": self.binary, return ExecutorBrowser, {"binary": self.binary,
"debug_info": self.debug_info, "debug_info": self.debug_info,
"binary_args": self.binary_args, "binary_args": self.binary_args,
"user_stylesheets": self.user_stylesheets, "user_stylesheets": self.user_stylesheets,
"render_backend": self.render_backend} "render_backend": self.render_backend,
"ca_certificate_path": self.ca_certificate_path}

View file

@ -86,6 +86,8 @@ class ServoTestharnessExecutor(ProcessTestExecutor):
args += ["--user-stylesheet", stylesheet] args += ["--user-stylesheet", stylesheet]
for pref, value in test.environment.get('prefs', {}).iteritems(): for pref, value in test.environment.get('prefs', {}).iteritems():
args += ["--pref", "%s=%s" % (pref, value)] args += ["--pref", "%s=%s" % (pref, value)]
if self.browser.ca_certificate_path:
args += ["--certificate-path", self.browser.ca_certificate_path]
args += self.browser.binary_args args += self.browser.binary_args
debug_args, command = browser_command(self.binary, args, self.debug_info) debug_args, command = browser_command(self.binary, args, self.debug_info)
@ -226,6 +228,9 @@ class ServoRefTestExecutor(ProcessTestExecutor):
command += ["--resolution", viewport_size or "800x600"] command += ["--resolution", viewport_size or "800x600"]
if self.browser.ca_certificate_path:
command += ["--certificate-path", self.browser.ca_certificate_path]
if dpi: if dpi:
command += ["--device-pixel-ratio", dpi] command += ["--device-pixel-ratio", dpi]

View file

@ -1,8 +0,0 @@
[basic.htm]
type: testharness
[Cross domain different protocol]
expected: FAIL
[Same domain different protocol different port]
expected: FAIL

View file

@ -3,3 +3,6 @@
[Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode] [Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
expected: FAIL expected: FAIL
[Fetch https://web-platform.test:8443/fetch/api/resources/top.txt with same-origin mode]
expected: FAIL

View file

@ -3,3 +3,6 @@
[Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode] [Fetch http://www1.web-platform.test:8000/fetch/api/resources/top.txt with same-origin mode]
expected: FAIL expected: FAIL
[Fetch https://web-platform.test:8443/fetch/api/resources/top.txt with same-origin mode]
expected: FAIL

View file

@ -39,3 +39,9 @@
[Cross domain different protocol [cors mode\]] [Cross domain different protocol [cors mode\]]
expected: FAIL expected: FAIL
[Same domain different protocol different port [server forbid CORS\]]
expected: FAIL
[Cross domain different protocol [server forbid CORS\]]
expected: FAIL

View file

@ -39,3 +39,9 @@
[Cross domain different protocol [cors mode\]] [Cross domain different protocol [cors mode\]]
expected: FAIL expected: FAIL
[Same domain different protocol different port [server forbid CORS\]]
expected: FAIL
[Cross domain different protocol [server forbid CORS\]]
expected: FAIL

View file

@ -1,8 +0,0 @@
[cors-no-preflight-worker.html]
type: testharness
[Cross domain different protocol [GET\]]
expected: FAIL
[Same domain different protocol different port [GET\]]
expected: FAIL

View file

@ -1,8 +0,0 @@
[cors-no-preflight.html]
type: testharness
[Cross domain different protocol [GET\]]
expected: FAIL
[Same domain different protocol different port [GET\]]
expected: FAIL

View file

@ -9,12 +9,6 @@
[Cross domain different port [origin KO\]] [Cross domain different port [origin KO\]]
expected: FAIL expected: FAIL
[Cross domain different protocol [origin OK\]]
expected: FAIL
[Same domain different protocol different port [origin OK\]]
expected: FAIL
[Cross domain [POST\] [origin KO\]] [Cross domain [POST\] [origin KO\]]
expected: FAIL expected: FAIL
@ -27,3 +21,9 @@
[Allowed origin: "" [origin KO\]] [Allowed origin: "" [origin KO\]]
expected: FAIL expected: FAIL
[Cross domain different protocol [origin KO\]]
expected: FAIL
[Same domain different protocol different port [origin KO\]]
expected: FAIL

View file

@ -9,12 +9,6 @@
[Cross domain different port [origin KO\]] [Cross domain different port [origin KO\]]
expected: FAIL expected: FAIL
[Cross domain different protocol [origin OK\]]
expected: FAIL
[Same domain different protocol different port [origin OK\]]
expected: FAIL
[Cross domain [POST\] [origin KO\]] [Cross domain [POST\] [origin KO\]]
expected: FAIL expected: FAIL
@ -27,3 +21,9 @@
[Allowed origin: "" [origin KO\]] [Allowed origin: "" [origin KO\]]
expected: FAIL expected: FAIL
[Cross domain different protocol [origin KO\]]
expected: FAIL
[Same domain different protocol different port [origin KO\]]
expected: FAIL

View file

@ -1,3 +1,23 @@
[messageevent-constructor.https.html] [messageevent-constructor.https.html]
type: testharness type: testharness
expected: TIMEOUT [Default event values]
expected: FAIL
[MessageEventInit dictionary]
expected: FAIL
[Passing null for ports member]
expected: FAIL
[ports attribute should be a FrozenArray]
expected: FAIL
[initMessageEvent operation]
expected: FAIL
[All parameters to initMessageEvent should be mandatory]
expected: FAIL
[Passing ServiceWorker for source member]
expected: FAIL

View file

@ -1,3 +1,5 @@
[promise-rejection-events.serviceworker.https.html] [promise-rejection-events.serviceworker.https.html]
type: testharness type: testharness
expected: TIMEOUT [Service worker setup]
expected: FAIL

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +1,5 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1,6 +1,5 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1,6 +1,5 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/4767

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +1,5 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1,6 +1,5 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1,6 +1,5 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: FAIL

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/4767

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -0,0 +1,5 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: FAIL

View file

@ -1,6 +1,6 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the attr-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the attr-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -0,0 +1,5 @@
[upgrade-protocol.keep-origin-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[upgrade-protocol.no-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: FAIL

View file

@ -0,0 +1,5 @@
[upgrade-protocol.swap-origin-redirect.http.html]
type: testharness
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via fetch-request using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: FAIL

View file

@ -1,6 +1,6 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: TIMEOUT
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via iframe-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.keep-origin-redirect.http.html] [upgrade-protocol.keep-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.no-redirect.http.html] [upgrade-protocol.no-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1,6 +1,6 @@
[upgrade-protocol.swap-origin-redirect.http.html] [upgrade-protocol.swap-origin-redirect.http.html]
type: testharness type: testharness
expected: ERROR expected: ERROR
[The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via a-tag using the attr-referrer\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.] [The referrer URL is stripped-referrer when a\n document served over http requires an https\n sub-resource via img-tag using the meta-referrer\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/4767

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[generic.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[generic.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with no-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is cross-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/4767

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[generic.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via script-tag using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1 +0,0 @@
disabled: https://github.com/servo/servo/issues/13503

View file

@ -1,6 +0,0 @@
[generic.keep-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with keep-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.no-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with no-redirect and when\n the target request is same-origin.]
expected: NOTRUN

View file

@ -1,6 +0,0 @@
[generic.swap-origin-redirect.http.html]
type: testharness
expected: TIMEOUT
[The referrer URL is omitted when a\n document served over http requires an https\n sub-resource via xhr-request using the http-rp\n delivery method with swap-origin-redirect and when\n the target request is same-origin.]
expected: NOTRUN

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