Backed out changeset eb2a83cba95a (bug 1497039) for XPCshell failures in browser/extensions/formautofill/test/unit/test_reconcile.js. CLOSED TREE
authorDorel Luca <dluca@mozilla.com>
Thu, 18 Oct 2018 01:33:07 +0300
changeset 441781 2b7afed367792d6158d2f1ac18e614091cd9b6af
parent 441780 7aafde5f425eaebe15aee67f05cb7c6ad02b9324
child 441782 a87fc8375ec28730643ba38f36a253e0ab5942c8
push id71218
push userdluca@mozilla.com
push dateWed, 17 Oct 2018 22:35:26 +0000
treeherderautoland@2b7afed36779 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1497039
milestone64.0a1
backs outeb2a83cba95aafab7713af2a444de144320b31e9
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
Backed out changeset eb2a83cba95a (bug 1497039) for XPCshell failures in browser/extensions/formautofill/test/unit/test_reconcile.js. CLOSED TREE
browser/components/preferences/in-content/preferences.js
browser/components/preferences/in-content/privacy.xul
browser/extensions/formautofill/FormAutofillParent.jsm
browser/extensions/formautofill/FormAutofillPreferences.jsm
browser/extensions/formautofill/test/browser/browser_privacyPreferences.js
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/in-content/preferences.js
@@ -231,27 +231,27 @@ async function spotlight(subcategory) {
     for (let element of highlightedElements) {
       element.classList.remove("spotlight");
     }
   }
   if (subcategory) {
     if (!gSearchResultsPane.categoriesInitialized) {
       await waitForSystemAddonInjectionsFinished([{
         isGoingToInject: formAutofillParent.initialized,
-        elementId: "formAutofillGroup",
+        elementId: "formAutofillGroupBox",
       }]);
     }
     scrollAndHighlight(subcategory);
   }
 
   /**
    * Wait for system addons finished their dom injections.
    * @param {Array} addons - The system addon information array.
    * For example, the element is looked like
-   * { isGoingToInject: true, elementId: "formAutofillGroup" }.
+   * { isGoingToInject: true, elementId: "formAutofillGroupBox" }.
    * The `isGoingToInject` means the system addon will be visible or not,
    * and the `elementId` means the id of the element will be injected into the dom
    * if the `isGoingToInject` is true.
    * @returns {Promise} Will resolve once all injections are finished.
    */
   function waitForSystemAddonInjectionsFinished(addons) {
     return new Promise(resolve => {
       let elementIdSet = new Set();
--- a/browser/components/preferences/in-content/privacy.xul
+++ b/browser/components/preferences/in-content/privacy.xul
@@ -364,22 +364,16 @@
     <hbox>
       <button id="changeMasterPassword"
               class="accessory-button"
               data-l10n-id="forms-master-pw-change"/>
     </hbox>
   </hbox>
 </groupbox>
 
-<!-- The form autofill section is inserted in to this box
-     after the form autofill extension has initialized. -->
-<groupbox id="formAutofillGroupBox"
-          data-category="panePrivacy"
-          data-subcategory="form-autofill"></groupbox>
-
 <!-- History -->
 <groupbox id="historyGroup" data-category="panePrivacy" hidden="true">
   <caption><label data-l10n-id="history-header"/></caption>
   <hbox align="center">
     <label id="historyModeLabel"
            control="historyMode"
            data-l10n-id="history-remember-label"/>
     <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
--- a/browser/extensions/formautofill/FormAutofillParent.jsm
+++ b/browser/extensions/formautofill/FormAutofillParent.jsm
@@ -128,19 +128,20 @@ FormAutofillParent.prototype = {
   },
 
   observe(subject, topic, data) {
     log.debug("observe:", topic, "with data:", data);
     switch (topic) {
       case "sync-pane-loaded": {
         let formAutofillPreferences = new FormAutofillPreferences();
         let document = subject.document;
-        let prefFragment = formAutofillPreferences.init(document);
-        let formAutofillGroupBox = document.getElementById("formAutofillGroupBox");
-        formAutofillGroupBox.appendChild(prefFragment);
+        let prefGroupBox = formAutofillPreferences.init(document);
+        let parentNode = document.getElementById("mainPrefPane");
+        let insertBeforeNode = document.getElementById("historyGroup");
+        parentNode.insertBefore(prefGroupBox, insertBeforeNode);
         break;
       }
 
       case "nsPref:changed": {
         // Observe pref changes and update _active cache if status is changed.
         this._updateStatus();
         break;
       }
--- a/browser/extensions/formautofill/FormAutofillPreferences.jsm
+++ b/browser/extensions/formautofill/FormAutofillPreferences.jsm
@@ -46,17 +46,17 @@ FormAutofillPreferences.prototype = {
    *
    * @param   {XULDocument} document
    * @returns {XULElement}
    */
   init(document) {
     this.createPreferenceGroup(document);
     this.attachEventListeners();
 
-    return this.refs.formAutofillFragment;
+    return this.refs.formAutofillGroupBox;
   },
 
   /**
    * Remove event listeners and the preference group.
    */
   uninit() {
     this.detachEventListeners();
     this.refs.formAutofillGroup.remove();
@@ -64,17 +64,17 @@ FormAutofillPreferences.prototype = {
 
   /**
    * Create Form Autofill preference group
    *
    * @param  {XULDocument} document
    */
   createPreferenceGroup(document) {
     let learnMoreURL = Services.urlFormatter.formatURLPref("app.support.baseURL") + "autofill-card-address";
-    let formAutofillFragment = document.createDocumentFragment();
+    let formAutofillGroupBox = document.createXULElement("groupbox");
     let formAutofillGroupBoxCaption = document.createXULElement("caption");
     let formAutofillGroupBoxCaptionLabel = document.createXULElement("label");
     let formAutofillGroupBoxDescription = document.createXULElement("description");
     let formAutofillGroup = document.createXULElement("vbox");
     let addressAutofill = document.createXULElement("hbox");
     let addressAutofillCheckboxGroup = document.createXULElement("hbox");
     let addressAutofillCheckbox = document.createXULElement("checkbox");
     let addressAutofillCheckboxLabel = document.createXULElement("label");
@@ -88,16 +88,19 @@ FormAutofillPreferences.prototype = {
     savedAddressesBtn.className = "accessory-button";
     addressAutofillCheckboxLabelSpacer.className = "tail-with-learn-more";
     addressAutofillLearnMore.className = "learnMore text-link";
 
     formAutofillGroup.id = "formAutofillGroup";
     addressAutofill.id = "addressAutofill";
     addressAutofillLearnMore.id = "addressAutofillLearnMore";
 
+    formAutofillGroupBox.setAttribute("id", "formAutofillGroupBox");
+    formAutofillGroupBox.setAttribute("data-category", "panePrivacy");
+    formAutofillGroupBox.setAttribute("data-subcategory", "form-autofill");
     formAutofillGroupBoxCaptionLabel.textContent = this.bundle.GetStringFromName("autofillHeader");
     formAutofillGroupBoxDescription.textContent =
       this.bundle.formatStringFromName("autofillDescription",
                                        [FormAutofillUtils.brandBundle.GetStringFromName("brandShortName")],
                                        1);
 
     addressAutofill.setAttribute("data-subcategory", "address-autofill");
     addressAutofillCheckboxLabel.textContent = this.bundle.GetStringFromName("autofillAddressesCheckbox");
@@ -119,30 +122,30 @@ FormAutofillPreferences.prototype = {
       addressAutofillCheckbox.setAttribute("checked", true);
     }
 
     addressAutofillCheckboxGroup.align = "center";
     addressAutofillCheckboxGroup.flex = 1;
     addressAutofillCheckboxLabel.flex = 1;
 
     formAutofillGroupBoxCaption.appendChild(formAutofillGroupBoxCaptionLabel);
-    formAutofillFragment.appendChild(formAutofillGroupBoxCaption);
-    formAutofillFragment.appendChild(formAutofillGroupBoxDescription);
-    formAutofillFragment.appendChild(formAutofillGroup);
+    formAutofillGroupBox.appendChild(formAutofillGroupBoxCaption);
+    formAutofillGroupBox.appendChild(formAutofillGroupBoxDescription);
+    formAutofillGroupBox.appendChild(formAutofillGroup);
     formAutofillGroup.appendChild(addressAutofill);
     addressAutofill.appendChild(addressAutofillCheckboxGroup);
     addressAutofillCheckboxGroup.appendChild(addressAutofillCheckbox);
     addressAutofillCheckboxGroup.appendChild(addressAutofillCheckboxLabel);
     addressAutofillCheckboxLabel.appendChild(addressAutofillCheckboxLabelSpacer);
     addressAutofillCheckboxLabel.appendChild(addressAutofillLearnMore);
     addressAutofill.appendChild(savedAddressesBtnWrapper);
     savedAddressesBtnWrapper.appendChild(savedAddressesBtn);
 
     this.refs = {
-      formAutofillFragment,
+      formAutofillGroupBox,
       formAutofillGroup,
       addressAutofillCheckbox,
       addressAutofillCheckboxLabel,
       savedAddressesBtn,
     };
 
     if (FormAutofill.isAutofillCreditCardsAvailable) {
       let creditCardAutofill = document.createXULElement("hbox");
--- a/browser/extensions/formautofill/test/browser/browser_privacyPreferences.js
+++ b/browser/extensions/formautofill/test/browser/browser_privacyPreferences.js
@@ -1,14 +1,14 @@
 "use strict";
 
 const PAGE_PREFS = "about:preferences";
 const PAGE_PRIVACY = PAGE_PREFS + "#privacy";
 const SELECTORS = {
-  group: "#formAutofillGroupBox",
+  group: "#passwordsGroup",
   addressAutofillCheckbox: "#addressAutofill checkbox",
   creditCardAutofillCheckbox: "#creditCardAutofill checkbox",
   savedAddressesBtn: "#addressAutofill button",
   savedCreditCardsBtn: "#creditCardAutofill button",
   addressAutofillLearnMore: "#addressAutofillLearnMore",
   creditCardAutofillLearnMore: "#creditCardAutofillLearnMore",
 };