mirror of
https://github.com/servo/servo.git
synced 2025-08-29 09:08:20 +01:00
removed rustc_serialize in style tests
This commit is contained in:
parent
086c48210c
commit
93cee84f9f
4 changed files with 8 additions and 7 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 rustc_serialize::json::Json;
|
||||
use serde_json::{self, Value};
|
||||
use std::env;
|
||||
use std::fs::{File, remove_file};
|
||||
use std::path::Path;
|
||||
|
@ -25,10 +25,11 @@ fn properties_list_json() {
|
|||
.status()
|
||||
.unwrap();
|
||||
assert!(status.success());
|
||||
let properties = Json::from_reader(&mut File::open(json).unwrap()).unwrap();
|
||||
|
||||
let properties: Value = serde_json::from_reader(File::open(json).unwrap()).unwrap();
|
||||
assert!(properties.as_object().unwrap().len() > 100);
|
||||
assert!(properties.find("margin").is_some());
|
||||
assert!(properties.find("margin-top").is_some());
|
||||
assert!(properties.as_object().unwrap().contains_key("margin"));
|
||||
assert!(properties.as_object().unwrap().contains_key("margin-top"));
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue