Merge release to GECKOVIEW_77_RELBRANCH. a=merge GECKOVIEW_77_RELBRANCH
authorRyan VanderMeulen <ryanvm@gmail.com>
Wed, 03 Jun 2020 14:37:04 -0400
branchGECKOVIEW_77_RELBRANCH
changeset 595173 6568582ac968c90c50763bd6320c1b2826a8e608
parent 595167 8929f2a9ac6af2dc49643c7e67a11a8cf45844ae (current diff)
parent 595171 dcbdba2ad905208b559c428069e168f2d413341b (diff)
child 600863 e4283a30fbae8e296b8d5974d8eee3492ae95ab6
push id2351
push userryanvm@gmail.com
push dateWed, 03 Jun 2020 18:37:50 +0000
treeherdermozilla-release@6568582ac968 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone77.0.1
Merge release to GECKOVIEW_77_RELBRANCH. a=merge
--- a/.hgtags
+++ b/.hgtags
@@ -2404,8 +2404,10 @@ b56c5586464ad74e5c980e38fba121705ffcc65c
 b56c5586464ad74e5c980e38fba121705ffcc65c DEVEDITION_77_0b9_RELEASE
 b56c5586464ad74e5c980e38fba121705ffcc65c FIREFOX_77_0b9_RELEASE
 63896e87d70e6d0323efba7d51f1ee2d7df21b69 FIREFOX_RELEASE_77_BASE
 109871b2551e8e28dfa311bced65057542c91388 FIREFOX_RELEASE_76_END
 69ca1d06f46ad976113938e6dfccfeb7315ee7a6 FIREFOX_77_0_BUILD1
 6c4a098b52dc0a793b55f2fb2894b80892873e2f FIREFOX_77_0_BUILD2
 54aaeaedcf47d75d19e9b9f90c31801434404537 FIREFOX_77_0_BUILD3
 54aaeaedcf47d75d19e9b9f90c31801434404537 FIREFOX_77_0_RELEASE
+b8d272601020250ac2897e113b3fc3b53b72cf4b FIREFOX_77_0_1_BUILD1
+b8d272601020250ac2897e113b3fc3b53b72cf4b FIREFOX_77_0_1_RELEASE
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -1820,16 +1820,20 @@ pref("extensions.screenshots.disabled", 
 pref("extensions.screenshots.upload-disabled", false);
 
 // DoH Rollout: the earliest date of profile creation for which we don't need
 // to show the doorhanger. This is when the version of the privacy statement
 // that includes DoH went live - Oct 31, 2019. This has to be a string because
 // the number is outside the signed 32-bit integer range.
 pref("doh-rollout.profileCreationThreshold", "1572476400000");
 
+// DoH Rollout: whether to enable automatic performance-based TRR-selection.
+// This pref is controlled by a Normandy rollout so we don't overload providers.
+pref("doh-rollout.trr-selection.enabled", false);
+
 // URL for Learn More link for browser error logging in preferences
 pref("browser.chrome.errorReporter.infoURL",
      "https://support.mozilla.org/1/firefox/%VERSION%/%OS%/%LOCALE%/nightly-error-collection");
 
 // Normandy client preferences
 pref("app.normandy.api_url", "https://normandy.cdn.mozilla.net/api/v1");
 pref("app.normandy.dev_mode", false);
 pref("app.normandy.enabled", true);
--- a/browser/config/version.txt
+++ b/browser/config/version.txt
@@ -1,1 +1,1 @@
-77.0
+77.0.1
--- a/browser/config/version_display.txt
+++ b/browser/config/version_display.txt
@@ -1,1 +1,1 @@
-77.0
+77.0.1
--- a/browser/extensions/doh-rollout/experiments/trrselect/api.js
+++ b/browser/extensions/doh-rollout/experiments/trrselect/api.js
@@ -5,31 +5,36 @@
 "use strict";
 
 /* global Cc, Ci, ExtensionAPI, TRRRacer  */
 
 ChromeUtils.import("resource://gre/modules/Services.jsm", this);
 ChromeUtils.import("resource:///modules/TRRPerformance.jsm", this);
 
 const kDryRunResultPref = "doh-rollout.trr-selection.dry-run-result";
+const kEnabledPref = "doh-rollout.trr-selection.enabled";
 
 const TRRSELECT_TELEMETRY_CATEGORY = "security.doh.trrPerformance";
 
 Services.telemetry.setEventRecordingEnabled(TRRSELECT_TELEMETRY_CATEGORY, true);
 
 this.trrselect = class trrselect extends ExtensionAPI {
   getAPI() {
     return {
       experiments: {
         trrselect: {
           async dryRun() {
             if (Services.prefs.prefHasUserValue(kDryRunResultPref)) {
               return;
             }
 
+            if (!Services.prefs.getBoolPref(kEnabledPref, false)) {
+              return;
+            }
+
             let setDryRunResultAndRecordTelemetry = trr => {
               Services.prefs.setCharPref(kDryRunResultPref, trr);
               Services.telemetry.recordEvent(
                 TRRSELECT_TELEMETRY_CATEGORY,
                 "trrselect",
                 "dryrunresult",
                 trr.substring(0, 40) // Telemetry payload max length
               );
--- a/browser/extensions/doh-rollout/test/browser/browser.ini
+++ b/browser/extensions/doh-rollout/test/browser/browser.ini
@@ -5,10 +5,11 @@ skip-if = debug # Bug 1548006 - reloadin
 [browser_cleanFlow.js]
 [browser_dirtyEnable.js]
 [browser_doorhangerUserReject.js]
 [browser_doorhanger_newProfile.js]
 [browser_policyOverride.js]
 skip-if = (!debug && bits == 64) #Bug 1605297
 [browser_rollback.js]
 skip-if = asan && !debug && os == 'linux' && bits == 64 && os_version == '18.04' # Bug 1613994 for linux1804
+[browser_trrSelection_disable.js]
 [browser_userInterference.js]
 skip-if = asan && !debug && os == 'linux' && bits == 64 && os_version == '18.04' # Bug 1615815 for linux1804
new file mode 100644
--- /dev/null
+++ b/browser/extensions/doh-rollout/test/browser/browser_trrSelection_disable.js
@@ -0,0 +1,70 @@
+"use strict";
+
+add_task(setup);
+
+add_task(async function testTrrSelectionDisable() {
+  // Set up a passing environment and enable DoH.
+  Preferences.set(prefs.DOH_TRR_SELECT_ENABLED_PREF, false);
+  setPassingHeuristics();
+  let promise = waitForDoorhanger();
+  Preferences.set(prefs.DOH_ENABLED_PREF, true);
+  await BrowserTestUtils.waitForCondition(() => {
+    return Preferences.get(prefs.DOH_SELF_ENABLED_PREF);
+  });
+  is(Preferences.get(prefs.DOH_SELF_ENABLED_PREF), true, "Breadcrumb saved.");
+  is(
+    Preferences.get(prefs.DOH_TRR_SELECT_DRY_RUN_RESULT_PREF),
+    undefined,
+    "TRR selection dry run not performed."
+  );
+  ensureNoTRRSelectionTelemetry();
+
+  let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, EXAMPLE_URL);
+  let panel = await promise;
+  is(
+    Preferences.get(prefs.DOH_DOORHANGER_SHOWN_PREF),
+    undefined,
+    "Doorhanger shown pref undefined before user interaction."
+  );
+
+  // Click the doorhanger's "accept" button.
+  let button = panel.querySelector(".popup-notification-primary-button");
+  promise = BrowserTestUtils.waitForEvent(panel, "popuphidden");
+  EventUtils.synthesizeMouseAtCenter(button, {});
+  await promise;
+
+  await ensureTRRMode(2);
+  await checkHeuristicsTelemetry("enable_doh", "startup");
+
+  await BrowserTestUtils.waitForCondition(() => {
+    return Preferences.get(prefs.DOH_DOORHANGER_SHOWN_PREF);
+  });
+  is(
+    Preferences.get(prefs.DOH_DOORHANGER_SHOWN_PREF),
+    true,
+    "Doorhanger shown pref saved."
+  );
+  is(
+    Preferences.get(prefs.DOH_DOORHANGER_USER_DECISION_PREF),
+    "UIOk",
+    "Doorhanger decision saved."
+  );
+  is(
+    Preferences.get(prefs.DOH_SELF_ENABLED_PREF),
+    true,
+    "Breadcrumb not cleared."
+  );
+
+  BrowserTestUtils.removeTab(tab);
+
+  // Restart the add-on for good measure.
+  await restartAddon();
+  ensureNoTRRSelectionTelemetry();
+  is(
+    Preferences.get(prefs.DOH_TRR_SELECT_DRY_RUN_RESULT_PREF),
+    undefined,
+    "TRR selection dry run not performed."
+  );
+  await ensureNoTRRModeChange(2);
+  await checkHeuristicsTelemetry("enable_doh", "startup");
+});
--- a/browser/extensions/doh-rollout/test/browser/head.js
+++ b/browser/extensions/doh-rollout/test/browser/head.js
@@ -27,16 +27,17 @@ const prefs = {
   DOH_PREVIOUS_TRR_MODE_PREF: "doh-rollout.previous.trr.mode",
   DOH_DOORHANGER_SHOWN_PREF: "doh-rollout.doorhanger-shown",
   DOH_DOORHANGER_USER_DECISION_PREF: "doh-rollout.doorhanger-decision",
   DOH_DISABLED_PREF: "doh-rollout.disable-heuristics",
   DOH_SKIP_HEURISTICS_PREF: "doh-rollout.skipHeuristicsCheck",
   DOH_DONE_FIRST_RUN_PREF: "doh-rollout.doneFirstRun",
   DOH_BALROG_MIGRATION_PREF: "doh-rollout.balrog-migration-done",
   DOH_DEBUG_PREF: "doh-rollout.debug",
+  DOH_TRR_SELECT_ENABLED_PREF: "doh-rollout.trr-selection.enabled",
   DOH_TRR_SELECT_DRY_RUN_RESULT_PREF:
     "doh-rollout.trr-selection.dry-run-result",
   MOCK_HEURISTICS_PREF: "doh-rollout.heuristics.mockValues",
   PROFILE_CREATION_THRESHOLD_PREF: "doh-rollout.profileCreationThreshold",
 };
 
 const fakePassingHeuristics = JSON.stringify({
   google: "enable_doh",
@@ -68,16 +69,20 @@ async function setup() {
   Services.telemetry.canRecordExtended = true;
   Services.telemetry.clearEvents();
 
   // Set the profile creation threshold to very far in the future by defualt,
   // so that we can test the doorhanger. browser_doorhanger_newProfile.js
   // overrides this.
   Preferences.set(prefs.PROFILE_CREATION_THRESHOLD_PREF, "99999999999999");
 
+  // Enable trr selection for tests. This is off by default so it can be
+  // controlled via Normandy.
+  Preferences.set(prefs.DOH_TRR_SELECT_ENABLED_PREF, true);
+
   registerCleanupFunction(async () => {
     Services.telemetry.canRecordExtended = oldCanRecord;
     Services.telemetry.clearEvents();
     await resetPrefsAndRestartAddon();
   });
 }
 
 async function checkTRRSelectionTelemetry() {
--- a/config/milestone.txt
+++ b/config/milestone.txt
@@ -5,9 +5,9 @@
 #    x.x.x.x
 #    x.x.x+
 #
 # Referenced by build/moz.configure/init.configure.
 # Hopefully I'll be able to automate replacement of *all*
 # hardcoded milestones in the tree from these two files.
 #--------------------------------------------------------
 
-77.0
+77.0.1
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -190,39 +190,37 @@ append_remove_instructions() {
     done
   fi
 }
 
 # List all files in the current directory, stripping leading "./"
 # Pass a variable name and it will be filled as an array.
 list_files() {
   count=0
-
+  temp_filelist=$(mktemp)
   find . -type f \
     ! -name "update.manifest" \
     ! -name "updatev2.manifest" \
     ! -name "updatev3.manifest" \
-    ! -name "temp-dirlist" \
-    ! -name "temp-filelist" \
     | sed 's/\.\/\(.*\)/\1/' \
-    | sort -r > "temp-filelist"
+    | sort -r > "${temp_filelist}"
   while read file; do
     eval "${1}[$count]=\"$file\""
     (( count++ ))
-  done < "temp-filelist"
-  rm "temp-filelist"
+  done < "${temp_filelist}"
+  rm "${temp_filelist}"
 }
 
 # List all directories in the current directory, stripping leading "./"
 list_dirs() {
   count=0
-
+  temp_dirlist=$(mktemp)
   find . -type d \
     ! -name "." \
     ! -name ".." \
     | sed 's/\.\/\(.*\)/\1/' \
-    | sort -r > "temp-dirlist"
+    | sort -r > "${temp_dirlist}"
   while read dir; do
     eval "${1}[$count]=\"$dir\""
     (( count++ ))
-  done < "temp-dirlist"
-  rm "temp-dirlist"
+  done < "${temp_dirlist}"
+  rm "${temp_dirlist}"
 }