Automatically provide a resource reader for tests

This commit is contained in:
Paul Rouget 2018-04-30 22:19:33 +08:00
parent bf667677f7
commit e02a23b2f6
20 changed files with 72 additions and 109 deletions

View file

@ -2,10 +2,8 @@
* 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/. */
extern crate embedder_traits;
extern crate servo_config;
use embedder_traits::resources::register_resources_for_tests;
use servo_config::basedir;
use servo_config::prefs::{PREFS, PrefValue, read_prefs};
use std::fs::{self, File};
@ -28,7 +26,6 @@ fn test_create_pref() {
#[test]
fn test_get_set_reset_extend() {
register_resources_for_tests();
let json_str = "{\
\"layout.writing-mode.enabled\": true,\
\"extra.stuff\": false,\