test(net): update test cases

This commit is contained in:
OJ Kwon 2018-03-30 12:15:57 -07:00
parent f69b124444
commit c4c0d263e9
No known key found for this signature in database
GPG key ID: 6C23A45602A44DA6
4 changed files with 23 additions and 27 deletions

View file

@ -16,6 +16,8 @@ extern crate msg;
extern crate net;
extern crate net_traits;
extern crate profile_traits;
extern crate script_traits;
extern crate servo_config;
extern crate servo_url;
extern crate time;
extern crate unicase;
@ -56,11 +58,12 @@ struct FetchResponseCollector {
fn new_fetch_context(dc: Option<Sender<DevtoolsControlMsg>>) -> FetchContext {
let ssl_client = create_ssl_client(&resources::read_string(Resource::SSLCertificates));
let (sender, _) = channel();
FetchContext {
state: Arc::new(HttpState::new(ssl_client)),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: dc,
filemanager: FileManager::new(),
filemanager: FileManager::new(sender),
cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(None))),
}
}