mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Address PR comments
- Remove fn `url_is_local` - Remove fn `set_local_urls_only` - Fix `test_fetch_with_local_urls_only`
This commit is contained in:
parent
6576fde29b
commit
3ec4515a73
3 changed files with 12 additions and 17 deletions
|
@ -284,17 +284,20 @@ fn test_fetch_with_local_urls_only() {
|
|||
request.referer = Referer::NoReferer;
|
||||
|
||||
// Set the flag.
|
||||
request.set_local_urls_only(true);
|
||||
request.local_urls_only = true;
|
||||
|
||||
let wrapped_request = Rc::new(request);
|
||||
fetch(wrapped_request)
|
||||
};
|
||||
|
||||
let local_url = Url::parse("about:config").unwrap();
|
||||
assert!(do_fetch(local_url).is_network_error());
|
||||
assert!(!do_fetch(server_url).is_network_error());
|
||||
let local_url = Url::parse("about:blank").unwrap();
|
||||
let local_response = do_fetch(local_url);
|
||||
let server_response = do_fetch(server_url);
|
||||
|
||||
let _ = server.close();
|
||||
|
||||
assert!(!local_response.is_network_error());
|
||||
assert!(server_response.is_network_error());
|
||||
}
|
||||
|
||||
fn test_fetch_redirect_count(message: &'static [u8], redirect_cap: u32) -> Response {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue