Bug 1424341 Turn the pref off for existing tests that perform fine-grained timing comparisons draft
authorTom Ritter <tom@mozilla.com>
Wed, 10 Jan 2018 14:46:34 -0600
changeset 718843 204d6801021c99476449b6362ddb0d9ed053457a
parent 718838 288c31e88fcab605619a8d6e9220b9168c8a2507
child 718929 35d816d0058dee9288d052badc8a33e4c8a12c96
push id95056
push userbmo:tom@mozilla.com
push dateWed, 10 Jan 2018 22:31:34 +0000
bugs1424341
milestone59.0a1
Bug 1424341 Turn the pref off for existing tests that perform fine-grained timing comparisons MozReview-Commit-ID: 4ZyE4ebaCaB
dom/animation/test/css-transitions/test_animation-starttime.html
dom/animation/test/document-timeline/test_document-timeline.html
dom/media/test/test_streams_element_capture.html
dom/media/test/test_streams_element_capture_createObjectURL.html
dom/media/test/test_video_stats_resistfingerprinting.html
testing/web-platform/meta/dom/events/__dir__.ini
testing/web-platform/meta/server-timing/__dir__.ini
testing/web-platform/meta/web-animations/timing-model/animations/__dir__.ini
testing/web-platform/meta/web-animations/timing-model/timelines/__dir__.ini
testing/web-platform/meta/webaudio/the-audio-api/__dir__.ini
--- a/dom/animation/test/css-transitions/test_animation-starttime.html
+++ b/dom/animation/test/css-transitions/test_animation-starttime.html
@@ -2,13 +2,15 @@
 <meta charset=utf-8>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
+  { "set":
+      [["dom.animations-api.core.enabled", true],
+       ["privacy.reduceTimerPrecision", false]]},
   function() {
     window.open("file_animation-starttime.html");
   });
 </script>
--- a/dom/animation/test/document-timeline/test_document-timeline.html
+++ b/dom/animation/test/document-timeline/test_document-timeline.html
@@ -2,13 +2,15 @@
 <meta charset=utf-8>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 <script>
 'use strict';
 setup({explicit_done: true});
 SpecialPowers.pushPrefEnv(
-  { "set": [["dom.animations-api.core.enabled", true]]},
+  { "set":
+      [["dom.animations-api.core.enabled", true],
+       ["privacy.reduceTimerPrecision", false]]},
   function() {
     window.open("file_document-timeline.html");
   });
 </script>
--- a/dom/media/test/test_streams_element_capture.html
+++ b/dom/media/test/test_streams_element_capture.html
@@ -83,16 +83,20 @@ function startTest(test) {
 }
 
 // We only test one playable video because for some of the audio files
 // --- small-shot.mp3.mp4 and small-shot.m4a --- GStreamer doesn't decode
 // as much data as indicated by the duration, causing this test to fail on
 // Linux. See bug 1084185.
 var testVideo = getPlayableVideo(gSmallTests);
 if (testVideo) {
-  startTest(testVideo);
+  SpecialPowers.pushPrefEnv(
+    { "set": [["privacy.reduceTimerPrecision", false]]},
+    function() {
+      startTest(testVideo);
+    });
 } else {
   todo(false, "No playable video");
 }
 </script>
 </pre>
 </body>
 </html>
--- a/dom/media/test/test_streams_element_capture_createObjectURL.html
+++ b/dom/media/test/test_streams_element_capture_createObjectURL.html
@@ -59,13 +59,17 @@ function startTest(test, token) {
     stream = v.mozCaptureStreamUntilEnded();
     is(stream.currentTime, 0, test.name + " stream initial currentTime");
     vout.src = URL.createObjectURL(stream);
     v.play();
     vout.play();
   };
 }
 
-manager.runTests([getPlayableVideo(gSmallTests)], startTest);
+SpecialPowers.pushPrefEnv(
+  { "set": [["privacy.reduceTimerPrecision", false]]},
+  function() {
+    manager.runTests([getPlayableVideo(gSmallTests)], startTest);
+  });
 </script>
 </pre>
 </body>
 </html>
--- a/dom/media/test/test_video_stats_resistfingerprinting.html
+++ b/dom/media/test/test_video_stats_resistfingerprinting.html
@@ -21,16 +21,17 @@ https://trac.torproject.org/projects/tor
 <script class="testbody" type="text/javascript">
   var manager = new MediaTestManager;
   const SPOOFED_FRAMES_PER_SECOND = 30;
   const SPOOFED_DROPPED_RATIO = 0.05;
   // Push the setting of 'privacy.resistFingerprinting' into gTestPrefs, which
   // will be set during MediaTestManager.runTests().
   gTestPrefs.push(
     ["privacy.resistFingerprinting", true],
+    ["privacy.resistFingerprinting.reduceTimerPrecision.microseconds", 100000],
     // We use 240p as the target resoultion since 480p is greater than every video
     // source in our test suite, so we need to use 240p here for allowing us to
     // test dropped rate here.
     ["privacy.resistFingerprinting.target_video_res", 240]
   );
   var testCases = [
     { name:"320x240.ogv", type:"video/ogg", width:320, height:240, duration:0.266, drop: false },
     { name:"seek.webm", type:"video/webm", width:320, height:240, duration:3.966, drop: false },
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/dom/events/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [privacy.reduceTimerPrecision:false]
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/server-timing/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [privacy.reduceTimerPrecision:false]
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/web-animations/timing-model/animations/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [privacy.reduceTimerPrecision:false]
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/web-animations/timing-model/timelines/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [privacy.reduceTimerPrecision:false]
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/meta/webaudio/the-audio-api/__dir__.ini
@@ -0,0 +1,1 @@
+prefs: [privacy.reduceTimerPrecision:false]
\ No newline at end of file