mirror of
https://github.com/servo/servo.git
synced 2025-08-16 02:45:36 +01:00
Updated the unit tests to include NetworkError
This commit is contained in:
parent
5e6f32a59b
commit
945a2c66e1
4 changed files with 22 additions and 23 deletions
|
@ -7,7 +7,7 @@ extern crate hyper;
|
|||
use ipc_channel::ipc;
|
||||
use net_traits::LoadConsumer::Channel;
|
||||
use net_traits::ProgressMsg::{Payload, Done};
|
||||
use net_traits::{LoadData, LoadContext};
|
||||
use net_traits::{LoadData, LoadContext, NetworkError};
|
||||
use self::hyper::header::ContentType;
|
||||
use self::hyper::mime::{Mime, TopLevel, SubLevel, Attr, Value};
|
||||
|
||||
|
@ -36,7 +36,7 @@ fn assert_parse(url: &'static str,
|
|||
|
||||
match data {
|
||||
None => {
|
||||
assert_eq!(progress, Done(Err("invalid data uri".to_owned())));
|
||||
assert_eq!(progress, Done(Err(NetworkError::Internal("invalid data uri".to_owned()))));
|
||||
}
|
||||
Some(dat) => {
|
||||
assert_eq!(progress, Payload(dat));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue