Bug 1407366 - Part 5: Reset the Zoom in browser_bug1369357_site_specific_zoom_level.js r=johann draft
authorTom Ritter <tom@mozilla.com>
Wed, 24 Apr 2019 09:37:12 -0500
changeset 1978909 1b23145ed904be055bf0efe1000e03ec50c02cb3
parent 1978908 b58bfc0bdc2451715ec895fbd06f40061fa301f9
child 1978910 0b1eef9eeb06668fc06b3b4d877daaf957c3c1da
push id356063
push usertritter@mozilla.com
push dateThu, 02 May 2019 21:31:49 +0000
treeherdertry@61badb0a4eee [default view] [failures only]
reviewersjohann
bugs1407366
milestone60.6.2
Bug 1407366 - Part 5: Reset the Zoom in browser_bug1369357_site_specific_zoom_level.js r=johann This test changes the browser zoom level; but does not reset it; causing subsequant tests to be run with a zoom. This may cause them to fail.
browser/components/resistfingerprinting/test/browser/browser_bug1369357_site_specific_zoom_level.js
browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
--- a/browser/components/resistfingerprinting/test/browser/browser_bug1369357_site_specific_zoom_level.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_bug1369357_site_specific_zoom_level.js
@@ -20,12 +20,14 @@ add_task(async function() {
     ]
   });
 
   tab3 = await BrowserTestUtils.openNewForegroundTab(gBrowser, testPage);
   tab3Zoom = ZoomManager.getZoomForBrowser(tab3.linkedBrowser);
 
   isnot(tab3Zoom, tab1Zoom, "privacy.resistFingerprinting is true, site-specific zoom level should be disabled");
 
+  await FullZoom.reset();
+
   await BrowserTestUtils.removeTab(tab1);
   await BrowserTestUtils.removeTab(tab2);
   await BrowserTestUtils.removeTab(tab3);
 });
--- a/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
+++ b/browser/components/resistfingerprinting/test/browser/browser_dynamical_window_rounding.js
@@ -1,14 +1,18 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * Bug 1407366 - A test case for reassuring the size of the content viewport is
  *   rounded if the window is resized when letterboxing is enabled.
+ *
+ * A helpful note: if this test starts randomly failing; it may be because the
+ * zoom level was not reset by an earlier-run test. See Bug 1407366 for an
+ * example.
  */
 
 const TEST_PATH = "http://example.net/browser/browser/components/resistfingerprinting/test/browser/";
 
 const DEFAULT_ROUNDED_WIDTH_STEP  = 200;
 const DEFAULT_ROUNDED_HEIGHT_STEP = 100;
 
 // A set of test cases which defines the width and the height of the outer window.