зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #6793 - Add basic unit test for `preload_hsts_domains` (from notriddle:hsts-preload); r=jdm
Closes #6789. Source-Repo: https://github.com/servo/servo Source-Revision: 2df88ee4b97fbc347dc99869b6989605760b662e
This commit is contained in:
Родитель
487f354031
Коммит
65722dd9bc
|
@ -5,7 +5,7 @@
|
|||
use net::hsts::HSTSList;
|
||||
use net::hsts::HSTSEntry;
|
||||
use net_traits::IncludeSubdomains;
|
||||
use net::hsts::secure_url;
|
||||
use net::hsts::{secure_url, preload_hsts_domains};
|
||||
use net::resource_task::ResourceManager;
|
||||
use std::sync::mpsc::channel;
|
||||
use url::Url;
|
||||
|
@ -271,6 +271,12 @@ fn test_hsts_list_with_expired_entry_is_not_is_host_secure() {
|
|||
assert!(!hsts_list.is_host_secure("mozilla.org"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_preload_hsts_domains_well_formed() {
|
||||
let hsts_list = preload_hsts_domains().unwrap();
|
||||
assert!(hsts_list.entries.len() != 0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_secure_url_does_not_change_explicit_port() {
|
||||
let url = Url::parse("http://mozilla.org:8080/").unwrap();
|
||||
|
|
Загрузка…
Ссылка в новой задаче