Bug 1446116 Disable timer jitter on test_ext_alarms.js r?gbrown draft
authorTom Ritter <tom@mozilla.com>
Fri, 23 Mar 2018 11:20:20 -0500
changeset 772572 e0d30a6716f7ef4a8679b8a748c704cb27724b69
parent 771197 45c68037f1020ac8ad075ffed7ca7f06cb916ca8
child 772612 c2f11a43c3f1497e3e496c0729e6fe744e042e0b
push id103963
push userbmo:tom@mozilla.com
push dateMon, 26 Mar 2018 13:27:19 +0000
reviewersgbrown
bugs1446116
milestone61.0a1
Bug 1446116 Disable timer jitter on test_ext_alarms.js r?gbrown MozReview-Commit-ID: 27Z3vIejv8y
toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
--- a/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_alarms.js
@@ -85,23 +85,25 @@ add_task(async function test_alarm_fires
 
   let extension = ExtensionTestUtils.loadExtension({
     background: `(${backgroundScript})()`,
     manifest: {
       permissions: ["alarms"],
     },
   });
 
+  Services.prefs.setBoolPref("privacy.resistFingerprinting.reduceTimerPrecision.jitter", false);
   await extension.startup();
   await extension.awaitFinish("alarm-when");
 
   // Defer unloading the extension so the asynchronous event listener
   // reply finishes.
   await new Promise(resolve => setTimeout(resolve, 0));
   await extension.unload();
+  Services.prefs.clearUserPref("privacy.resistFingerprinting.reduceTimerPrecision.jitter");
 });
 
 add_task(async function test_alarm_clear_non_matching_name() {
   async function backgroundScript() {
     let ALARM_NAME = "test_ext_alarms";
 
     browser.alarms.create(ALARM_NAME, {when: Date.now() + 2000});