Bug 1425462 Address tests for Time Jittering. r=bkelly
authorTom Ritter <tom@mozilla.com>
Thu, 15 Feb 2018 15:34:05 -0600
changeset 461466 dd7b7e91140a3c42f395b6a0a58e5db90e28db1b
parent 461465 3052a1cf3b1c20b4d9bcc6c03bb1e8d45fddca0b
child 461467 32c7dafa1dc1837f9fa3a35a8d76ba70d7a0f9bf
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1425462
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1425462 Address tests for Time Jittering. r=bkelly The following tests all hardcoded a special value for Timer Precision Reduction. browser/components/extensions/test/xpcshell/test_ext_browsingData_cookies_cache.js browser/components/resistfingerprinting/test/browser/browser_performanceAPI.js browser/components/resistfingerprinting/test/mochitest/test_animation_api.html browser/components/resistfingerprinting/test/mochitest/test_reduce_time_precision.html devtools/client/sourceeditor/test/browser_codemirror.js dom/animation/test/css-animations/test_animation-currenttime.html dom/animation/test/mozilla/test_transition_finish_on_compositor.html dom/media/test/test_video_stats_resistfingerprinting.html dom/tests/mochitest/ajax/jquery/test_jQuery.html netwerk/test/unit/test_race_cache_with_network.js Of these, only test_video_stats_resistfingerprinting.html begins failing when Jitter is enabled. So disable jitter for that test. Additionally, dom/midi/tests/test_midi_packet_timing_sorting.html began failing with Jitter, so we disable it there. (We could easily modify the test so it began passing, but this would reduce the effectiveness of the test.) MozReview-Commit-ID: 2kipxV6wYv9
dom/media/test/test_video_stats_resistfingerprinting.html
dom/midi/tests/test_midi_packet_timing_sorting.html
--- a/dom/media/test/test_video_stats_resistfingerprinting.html
+++ b/dom/media/test/test_video_stats_resistfingerprinting.html
@@ -22,16 +22,17 @@ https://trac.torproject.org/projects/tor
   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],
+    ["privacy.resistFingerprinting.reduceTimerPrecision.jitter", false],
     // 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 },
--- a/dom/midi/tests/test_midi_packet_timing_sorting.html
+++ b/dom/midi/tests/test_midi_packet_timing_sorting.html
@@ -8,16 +8,17 @@
   </head>
 
   <body onload="runTests()">
     <script class="testbody" type="application/javascript">
      SimpleTest.waitForExplicitFinish();
 
      async function runTests() {
        await MIDITestUtils.permissionSetup(true);
+       await SpecialPowers.pushPrefEnv({"set": [["privacy.resistFingerprinting.reduceTimerPrecision.jitter", false]]});
        var checkCount = 0;
        var lastTime = 0;
        var reopened = false;
        var input;
        var output;
        function checkReturn(event) {
          ok(event.timeStamp > lastTime, "Received timestamp " + event.timeStamp + " should be greater than " + lastTime);
          lastTime = event.timeStamp;