Bug 1294190 - fix latent problems in test_service_prefs.html; r?gregtatum
MozReview-Commit-ID: GkqfMh14Aio
--- a/devtools/client/shared/shim/test/test_service_prefs.html
+++ b/devtools/client/shared/shim/test/test_service_prefs.html
@@ -138,21 +138,21 @@ function do_tests() {
is(Services.prefs.getPrefType("devtools.branch1.somestring"),
Services.prefs.PREF_STRING, "type of string pref");
WrappedPrefs.setBoolPref("devtools.branch1.somebool", true);
ok(WrappedPrefs.getBoolPref("devtools.branch1.somebool"), "set bool pref");
WrappedPrefs.setIntPref("devtools.branch2.someint", -93);
is(WrappedPrefs.getIntPref("devtools.branch2.someint"), -93, "set int pref");
WrappedPrefs.setCharPref("devtools.branch1.somestring", "hello");
- ok(WrappedPrefs.getCharPref("devtools.branch1.somestring"), "hello",
+ is(WrappedPrefs.getCharPref("devtools.branch1.somestring"), "hello",
"set string pref");
Services.prefs.clearUserPref("devtools.branch1.somestring");
- ok(Services.prefs.getCharPref("devtools.branch1.somestring"), "dinosaurs",
+ is(Services.prefs.getCharPref("devtools.branch1.somestring"), "dinosaurs",
"clear string pref");
ok(Services.prefs.prefHasUserValue("devtools.branch1.somebool"),
"bool pref has user value");
ok(!Services.prefs.prefHasUserValue("devtools.branch1.somestring"),
"string pref does not have user value");
@@ -162,19 +162,19 @@ function do_tests() {
let branch0 = Services.prefs.getBranch(null);
let branch1 = Services.prefs.getBranch("devtools.branch1.");
branch1.setCharPref("somestring", "octopus");
Services.prefs.setCharPref("devtools.branch1.somestring", "octopus");
is(Services.prefs.getCharPref("devtools.branch1.somestring"), "octopus",
"set correctly via branch");
- ok(branch0.getCharPref("devtools.branch1.somestring"), "octopus",
+ is(branch0.getCharPref("devtools.branch1.somestring"), "octopus",
"get via base branch");
- ok(branch1.getCharPref("somestring"), "octopus", "get via branch");
+ is(branch1.getCharPref("somestring"), "octopus", "get via branch");
let notifications = {};
let clearNotificationList = () => { notifications = {}; }
let observer = {
observe: function (subject, topic, data) {
notifications[data] = true;
}