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

@ -552,12 +552,13 @@ fn test_fetch_with_hsts() {
let mut ca_content = String::new();
File::open(cert_path).unwrap().read_to_string(&mut ca_content).unwrap();
let ssl_client = create_ssl_client(&ca_content);
let (sender, _) = channel();
let context = FetchContext {
state: Arc::new(HttpState::new(ssl_client)),
user_agent: DEFAULT_USER_AGENT.into(),
devtools_chan: None,
filemanager: FileManager::new(),
filemanager: FileManager::new(sender),
cancellation_listener: Arc::new(Mutex::new(CancellationListener::new(None))),
};