mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +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
|
@ -82,10 +82,6 @@ fn fetch(request: Request, dc: Option<Sender<DevtoolsControlMsg>>) -> Response {
|
|||
receiver.recv().unwrap()
|
||||
}
|
||||
|
||||
fn fetch_sync(request: Request, dc: Option<Sender<DevtoolsControlMsg>>) -> Response {
|
||||
fetch_with_context(request, &new_fetch_context(dc))
|
||||
}
|
||||
|
||||
fn fetch_with_context(request: Request, context: &FetchContext) -> Response {
|
||||
methods::fetch(Rc::new(request), &mut None, context)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue