test_pref_change.js (709B)
1 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 /** 7 * Test that pref values are correctly updated when they change. 8 */ 9 10 add_task(function () { 11 const PREFS_LIST = ["installer.pref"]; 12 13 Services.prefs.setBoolPref("installer.pref", true); 14 15 startModule(PREFS_LIST); 16 17 verifyReflectedPrefs(PREFS_LIST); 18 19 Services.prefs.setBoolPref("installer.pref", false); 20 21 verifyReflectedPrefs(PREFS_LIST); 22 23 Services.prefs.setBoolPref("installer.pref", true); 24 25 verifyReflectedPrefs(PREFS_LIST); 26 });