mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Add unit tests
This commit is contained in:
parent
63a7e8efdf
commit
16f1947e24
3 changed files with 120 additions and 7 deletions
|
@ -552,7 +552,7 @@ fn test_load_sets_requests_cookies_header_for_url_by_getting_cookies_from_the_re
|
|||
&url,
|
||||
CookieSource::HTTP
|
||||
).unwrap();
|
||||
cookie_jar.push(cookie, CookieSource::HTTP);
|
||||
cookie_jar.push(cookie, &url, CookieSource::HTTP);
|
||||
}
|
||||
|
||||
let request = Request::from_init(RequestInit {
|
||||
|
@ -590,7 +590,7 @@ fn test_load_sends_cookie_if_nonhttp() {
|
|||
&url,
|
||||
CookieSource::NonHTTP
|
||||
).unwrap();
|
||||
cookie_jar.push(cookie, CookieSource::HTTP);
|
||||
cookie_jar.push(cookie, &url, CookieSource::HTTP);
|
||||
}
|
||||
|
||||
let request = Request::from_init(RequestInit {
|
||||
|
@ -982,14 +982,14 @@ fn test_redirect_from_x_to_y_provides_y_cookies_from_y() {
|
|||
CookieSource::HTTP
|
||||
).unwrap();
|
||||
|
||||
cookie_jar.push(cookie_x, CookieSource::HTTP);
|
||||
cookie_jar.push(cookie_x, &url_x, CookieSource::HTTP);
|
||||
|
||||
let cookie_y = Cookie::new_wrapped(
|
||||
CookiePair::new("mozillaIs".to_owned(), "theBest".to_owned()),
|
||||
&url_y,
|
||||
CookieSource::HTTP
|
||||
).unwrap();
|
||||
cookie_jar.push(cookie_y, CookieSource::HTTP);
|
||||
cookie_jar.push(cookie_y, &url_y, CookieSource::HTTP);
|
||||
}
|
||||
|
||||
let request = Request::from_init(RequestInit {
|
||||
|
@ -1175,7 +1175,7 @@ fn test_cookies_blocked() {
|
|||
&url,
|
||||
CookieSource::HTTP
|
||||
).unwrap();
|
||||
cookie_jar.push(cookie, CookieSource::HTTP);
|
||||
cookie_jar.push(cookie, &url, CookieSource::HTTP);
|
||||
}
|
||||
|
||||
let request = Request::from_init(RequestInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue