mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Use the asynchronous fetching code in unit tests.
This is the only code that is used in Servo proper, so it's a more useful thing to test.
This commit is contained in:
parent
c03cd45258
commit
a5efc01b5f
4 changed files with 40 additions and 44 deletions
|
@ -2,7 +2,7 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use fetch_sync;
|
||||
use fetch;
|
||||
use hyper::header::ContentType;
|
||||
use hyper::mime::{Attr, Mime, SubLevel, TopLevel, Value};
|
||||
use hyper_serde::Serde;
|
||||
|
@ -21,7 +21,7 @@ fn assert_parse(url: &'static str,
|
|||
let origin = Origin::Origin(url.origin());
|
||||
let request = Request::new(url, Some(origin), false, None);
|
||||
|
||||
let response = fetch_sync(request, None);
|
||||
let response = fetch(request, None);
|
||||
|
||||
match data {
|
||||
Some(data) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue