test_existing_prefs.js (497B)
1 function isParentProcess() { 2 let appInfo = Cc["@mozilla.org/xre/app-info;1"]; 3 return ( 4 !appInfo || 5 Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT 6 ); 7 } 8 9 function run_test() { 10 if (!isParentProcess()) { 11 do_load_child_test_harness(); 12 13 var pb = Services.prefs; 14 pb.setBoolPref("Test.IPC.bool.new", true); 15 pb.setIntPref("Test.IPC.int.new", 23); 16 pb.setCharPref("Test.IPC.char.new", "hey"); 17 18 run_test_in_child("test_observed_prefs.js"); 19 } 20 }