Package: Merge changed prefs from package-prefs.json to prefs.json

This commit is contained in:
UK992 2016-12-26 16:44:31 +01:00
parent 7f2da7483b
commit 7eb4d7a9a7
5 changed files with 39 additions and 76 deletions

View file

@ -12,7 +12,7 @@ fn test_create_pref() {
let json_str = "{\
\"layout.writing-mode.enabled\": true,\
\"network.mime.sniff\": false,\
\"shell.homepage\": \"http://servo.org\"\
\"shell.homepage\": \"https://servo.org\"\
}";
let prefs = read_prefs_from_file(json_str.as_bytes());
@ -33,11 +33,11 @@ fn test_get_set_reset_extend() {
assert_eq!(*PREFS.get("test"), PrefValue::Missing);
PREFS.set("test", PrefValue::String("hi".to_owned()));
assert_eq!(*PREFS.get("test"), PrefValue::String("hi".to_owned()));
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("http://servo.org".to_owned()));
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("https://servo.org".to_owned()));
PREFS.set("shell.homepage", PrefValue::Boolean(true));
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::Boolean(true));
PREFS.reset("shell.homepage");
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("http://servo.org".to_owned()));
assert_eq!(*PREFS.get("shell.homepage"), PrefValue::String("https://servo.org".to_owned()));
let extension = read_prefs_from_file(json_str.as_bytes()).unwrap();
PREFS.extend(extension);