Bug 1429017 - Added spotlight upon clicking view in preferences in address autofill doorhanger r=MattN
authorSam Reading-Thompson, Robin Hodda, Joseph Fergusson <17988@cgs.act.edu.au>
Mon, 22 Jan 2018 16:02:55 -0800
changeset 401635 2a7e34625fb8
parent 401634 26403995065c
child 401636 be82f6125c75
push id33351
push userbtara@mozilla.com
push dateWed, 31 Jan 2018 10:00:45 +0000
treeherdermozilla-central@7b46ef2ae141 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1429017
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 1429017 - Added spotlight upon clicking view in preferences in address autofill doorhanger r=MattN
browser/extensions/formautofill/FormAutofillParent.jsm
browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -438,17 +438,17 @@ FormAutofillParent.prototype = {
         Services.prefs.setBoolPref(FormAutofillUtils.ADDRESSES_FIRST_TIME_USE_PREF, false);
         showDoorhanger = async () => {
           const description = FormAutofillUtils.getAddressLabel(address.record);
           const state = await FormAutofillDoorhanger.show(target, "firstTimeUse", description);
           if (state !== "open-pref") {
             return;
           }
 
-          target.ownerGlobal.openPreferences("panePrivacy",
+          target.ownerGlobal.openPreferences("privacy-address-autofill",
                                              {origin: "autofillDoorhanger"});
         };
       } else {
         // We want to exclude the first time form filling.
         Services.telemetry.scalarAdd("formautofill.addresses.fill_type_manual", 1);
       }
     }
     return showDoorhanger;
--- a/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js
+++ b/browser/extensions/formautofill/test/browser/browser_first_time_use_doorhanger.js
@@ -82,17 +82,17 @@ add_task(async function test_first_time_
       [SYNC_USERNAME_PREF, "foo@bar.com"],
     ],
   });
 
   await BrowserTestUtils.withNewTab({gBrowser, url: FORM_URL},
     async function(browser) {
       let promiseShown = BrowserTestUtils.waitForEvent(PopupNotifications.panel,
                                                        "popupshown");
-      let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "about:preferences#privacy");
+      let tabPromise = BrowserTestUtils.waitForNewTab(gBrowser, "about:preferences#privacy-address-autofill");
       await ContentTask.spawn(browser, null, async function() {
         let form = content.document.getElementById("form");
         form.querySelector("#organization").focus();
         form.querySelector("#organization").value = "Foobar";
         form.querySelector("#email").value = "foo@bar.com";
         form.querySelector("#tel").value = "1-234-567-8900";
 
         // Wait 500ms before submission to make sure the input value applied