Backed out 3 changesets (bug 1517213) for ES lint failure in /browser/components/aboutconfig/test/browser/browser_edit.js CLOSED TREE
authorMargareta Eliza Balazs <ebalazs@mozilla.com>
Thu, 03 Jan 2019 13:47:33 +0200
changeset 509540 39d6e47b5bf4dbbbb540586b1841680a11e517c1
parent 509539 58633320257f3ee65956d44cfb10d501c65ea866
child 509541 63027ff03effb04ed4bf53bbb0c9aa1bad4b4c9b
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1517213
milestone66.0a1
backs out798c09311606328e8c7374468b16859113ab883c
8dcd5d5e815ddea060c89a7cffd2d075aadf8ab2
f0489fc1ef50db55b5af0e3d0a741ed1ab23b3e3
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 3 changesets (bug 1517213) for ES lint failure in /browser/components/aboutconfig/test/browser/browser_edit.js CLOSED TREE Backed out changeset 798c09311606 (bug 1517213) Backed out changeset 8dcd5d5e815d (bug 1517213) Backed out changeset f0489fc1ef50 (bug 1517213)
browser/components/aboutconfig/content/aboutconfig.js
browser/components/aboutconfig/test/browser/browser_basic.js
browser/components/aboutconfig/test/browser/browser_edit.js
browser/components/aboutconfig/test/browser/browser_locked.js
browser/components/aboutconfig/test/browser/browser_search.js
browser/components/aboutconfig/test/browser/head.js
--- a/browser/components/aboutconfig/content/aboutconfig.js
+++ b/browser/components/aboutconfig/content/aboutconfig.js
@@ -5,45 +5,16 @@
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/Preferences.jsm");
 
 let gDefaultBranch = Services.prefs.getDefaultBranch("");
 let gPrefArray;
 let gPrefRowInEdit;
 let gPrefInEdit;
 
-class PrefRow {
-  constructor(name) {
-    this.name = name;
-    this.refreshValue();
-  }
-
-  refreshValue() {
-    this.hasUserValue = Services.prefs.prefHasUserValue(this.name);
-    this.hasDefaultValue = this.hasUserValue ? prefHasDefaultValue(this.name)
-                                             : true;
-    this.isLocked = Services.prefs.prefIsLocked(this.name);
-
-    try {
-      // This can throw for locked preferences without a default value.
-      this.value = Preferences.get(this.name);
-      // We don't know which preferences should be read using getComplexValue,
-      // so we use a heuristic to determine if this is a localized preference.
-      if (!this.hasUserValue &&
-          /^chrome:\/\/.+\/locale\/.+\.properties/.test(this.value)) {
-        // This can throw if there is no value in the localized files.
-        this.value = Services.prefs.getComplexValue(this.name,
-          Ci.nsIPrefLocalizedString).data;
-      }
-    } catch (ex) {
-      this.value = "";
-    }
-  }
-}
-
 function getPrefName(prefRow) {
   return prefRow.getAttribute("aria-label");
 }
 
 document.addEventListener("DOMContentLoaded", () => {
   if (!Preferences.get("browser.aboutConfig.showWarning")) {
     loadPrefs();
   }
@@ -62,17 +33,38 @@ function loadPrefs() {
   search.type = "text";
   search.id = "search";
   document.l10n.setAttributes(search, "about-config-search");
   document.body.appendChild(search);
   let prefs = document.createElement("table");
   prefs.id = "prefs";
   document.body.appendChild(prefs);
 
-  gPrefArray = Services.prefs.getChildList("").map(name => new PrefRow(name));
+  gPrefArray = Services.prefs.getChildList("").map(function(name) {
+    let hasUserValue = Services.prefs.prefHasUserValue(name);
+    let pref = {
+      name,
+      hasUserValue,
+      hasDefaultValue: hasUserValue ? prefHasDefaultValue(name) : true,
+      isLocked: Services.prefs.prefIsLocked(name),
+    };
+    // Try in case it's a localized string or locked user added pref
+    // If an execption is thrown the pref value is set to the empty string.
+    try {
+      // Throws an exception in case locked user added pref without default value
+      pref.value = Preferences.get(name);
+      // Throws an exception if there is no equivalent value in the localized files for the pref.
+      if (!pref.hasUserValue && /^chrome:\/\/.+\/locale\/.+\.properties/.test(pref.value)) {
+        pref.value = Services.prefs.getComplexValue(name, Ci.nsIPrefLocalizedString).data;
+      }
+    } catch (ex) {
+      pref.value = "";
+    }
+    return pref;
+  });
 
   gPrefArray.sort((a, b) => a.name > b.name);
 
   search.addEventListener("keypress", e => {
     if (e.key == "Enter") {
       filterPrefs();
     }
   });
@@ -83,17 +75,18 @@ function loadPrefs() {
     }
     let prefRow = event.target.closest("tr");
     let prefName = getPrefName(prefRow);
     let pref = gPrefArray.find(p => p.name == prefName);
     let button = event.target.closest("button");
     if (button.classList.contains("button-reset")) {
       // Reset pref and update gPrefArray.
       Services.prefs.clearUserPref(prefName);
-      pref.refreshValue();
+      pref.value = Preferences.get(prefName);
+      pref.hasUserValue = false;
       // Update UI.
       prefRow.textContent = "";
       prefRow.classList.remove("has-user-value");
       prefRow.appendChild(getPrefRow(pref));
       prefRow.querySelector("td.cell-edit").firstChild.focus();
     } else if (button.classList.contains("add-true")) {
       addNewPref(prefRow.firstChild.innerHTML, true);
     } else if (button.classList.contains("add-false")) {
@@ -104,17 +97,18 @@ function loadPrefs() {
         button.classList.contains("add-Number") ? 0 : "");
       prefRow = [...prefs.getElementsByTagName("tr")]
         .find(row => row.querySelector("td").textContent == prefName);
       startEditingPref(prefRow, gPrefArray.find(p => p.name == prefName));
       prefRow.querySelector("td.cell-value").firstChild.firstChild.focus();
     } else if (button.classList.contains("button-toggle")) {
       // Toggle the pref and update gPrefArray.
       Services.prefs.setBoolPref(prefName, !pref.value);
-      pref.refreshValue();
+      pref.value = !pref.value;
+      pref.hasUserValue = Services.prefs.prefHasUserValue(pref.name);
       // Update UI.
       prefRow.textContent = "";
       if (pref.hasUserValue) {
         prefRow.classList.add("has-user-value");
       } else {
         prefRow.classList.remove("has-user-value");
       }
       prefRow.appendChild(getPrefRow(pref));
@@ -297,17 +291,18 @@ function endEditingPref(row) {
     }
     newValue = numberValue;
     Services.prefs.setIntPref(name, newValue);
   } else {
     Services.prefs.setStringPref(name, newValue);
   }
 
   // Update gPrefArray.
-  gPrefInEdit.refreshValue();
+  gPrefInEdit.value = newValue;
+  gPrefInEdit.hasUserValue = Services.prefs.prefHasUserValue(name);
   // Update UI.
   row.textContent = "";
   if (gPrefInEdit.hasUserValue) {
     row.classList.add("has-user-value");
   } else {
     row.classList.remove("has-user-value");
   }
   row.appendChild(getPrefRow(gPrefInEdit));
@@ -327,12 +322,17 @@ function prefHasDefaultValue(name) {
         return true;
     }
   } catch (ex) {}
   return false;
 }
 
 function addNewPref(name, value) {
   Preferences.set(name, value);
-  gPrefArray.push(new PrefRow(name));
+  gPrefArray.push({
+    name,
+    value,
+    hasUserValue: true,
+    hasDefaultValue: false,
+  });
   gPrefArray.sort((a, b) => a.name > b.name);
   filterPrefs();
 }
--- a/browser/components/aboutconfig/test/browser/browser_basic.js
+++ b/browser/components/aboutconfig/test/browser/browser_basic.js
@@ -1,49 +1,51 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
-      ["test.aboutconfig.userValueLikeLocalized",
-       "chrome://test/locale/testing.properties"],
+      ["random.user.pref", "chrome://test/locale/testing.properties"],
     ],
   });
 });
 
 add_task(async function test_load_title() {
   await AboutConfigTest.withNewTab(async function() {
     Assert.equal(this.document.title, "about:config");
   });
 });
 
 add_task(async function test_load_settings() {
   await AboutConfigTest.withNewTab(async function() {
     // Test if page contains elements.
-    Assert.equal(this.getRow(PREF_NUMBER_DEFAULT_ZERO).value, 0);
-    Assert.equal(this.getRow(PREF_STRING_DEFAULT_EMPTY).value, "");
+    Assert.ok(this.getRow("plugins.testmode"));
+    Assert.ok(this.getRow("dom.vr.enabled"));
+    Assert.ok(this.getRow("accessibility.AOM.enabled"));
 
     // Test if the modified state is displayed for the right prefs.
-    Assert.ok(!this.getRow(PREF_BOOLEAN_DEFAULT_TRUE)
-                   .hasClass("has-user-value"));
-    Assert.ok(this.getRow(PREF_BOOLEAN_USERVALUE_TRUE)
-                  .hasClass("has-user-value"));
+    let prefArray = Services.prefs.getChildList("");
+    let nameOfEdited = prefArray.find(
+      name => Services.prefs.prefHasUserValue(name));
+    let nameOfDefault = prefArray.find(
+      name => !Services.prefs.prefHasUserValue(name));
+    Assert.ok(!this.getRow(nameOfDefault).hasClass("has-user-value"));
+    Assert.ok(this.getRow(nameOfEdited).hasClass("has-user-value"));
 
-    // Test to see if values are localized, sampling from different files. If
-    // any of these are removed or their value changes, just update the value
-    // here or point to a different preference in the same file.
+    // Test to see if values are localized.
     Assert.equal(this.getRow("font.language.group").value, "x-western");
     Assert.equal(this.getRow("intl.ellipsis").value, "\u2026");
     Assert.equal(
       this.getRow("gecko.handlerService.schemes.mailto.1.uriTemplate").value,
       "https://mail.google.com/mail/?extsrc=mailto&url=%s");
 
     // Test to see if user created value is not empty string when it matches
     // /^chrome:\/\/.+\/locale\/.+\.properties/.
-    Assert.equal(this.getRow("test.aboutconfig.userValueLikeLocalized").value,
+    Assert.equal(this.getRow("random.user.pref").value,
       "chrome://test/locale/testing.properties");
 
     // Test to see if empty string when value matches
     // /^chrome:\/\/.+\/locale\/.+\.properties/ and an exception is thrown.
-    Assert.equal(this.getRow(PREF_STRING_LOCALIZED_MISSING).value, "");
+    Assert.equal(this.getRow("gecko.handlerService.schemes.irc.1.name").value,
+      "");
   });
 });
--- a/browser/components/aboutconfig/test/browser/browser_edit.js
+++ b/browser/components/aboutconfig/test/browser/browser_edit.js
@@ -6,19 +6,19 @@ add_task(async function setup() {
     set: [
       ["test.aboutconfig.modify.boolean", true],
       ["test.aboutconfig.modify.number", 1337],
       ["test.aboutconfig.modify.string", "the answer to the life the universe and everything"],
     ],
   });
 
   registerCleanupFunction(() => {
-    Services.prefs.clearUserPref(PREF_BOOLEAN_DEFAULT_TRUE);
-    Services.prefs.clearUserPref(PREF_NUMBER_DEFAULT_ZERO);
-    Services.prefs.clearUserPref(PREF_STRING_DEFAULT_EMPTY);
+    Services.prefs.clearUserPref("accessibility.typeaheadfind.autostart");
+    Services.prefs.clearUserPref("accessibility.typeaheadfind.soundURL");
+    Services.prefs.clearUserPref("accessibility.typeaheadfind.casesensitive");
   });
 });
 
 add_task(async function test_add_user_pref() {
   await AboutConfigTest.withNewTab(async function() {
     Assert.ok(!Services.prefs.getChildList("").find(pref => pref == "testPref"));
 
     for (let [buttonSelector, expectedValue] of [
@@ -35,113 +35,101 @@ add_task(async function test_add_user_pr
     }
   });
 });
 
 add_task(async function test_delete_user_pref() {
   Services.prefs.setBoolPref("userAddedPref", true);
   await AboutConfigTest.withNewTab(async function() {
     let row = this.getRow("userAddedPref");
-    row.resetColumnButton.click();
+    row.element.lastChild.lastChild.click();
     Assert.ok(!this.getRow("userAddedPref"));
     Assert.ok(!Services.prefs.getChildList("").includes("userAddedPref"));
 
     // Search for nothing to test gPrefArray
     this.search();
     Assert.ok(!this.getRow("userAddedPref"));
   });
 });
 
 add_task(async function test_reset_user_pref() {
-  await SpecialPowers.pushPrefEnv({
-    "set": [
-      [PREF_BOOLEAN_DEFAULT_TRUE, false],
-      [PREF_STRING_LOCALIZED_MISSING, "user-value"],
-    ],
-  });
+  await SpecialPowers.pushPrefEnv({"set": [["browser.autofocus", false]]});
 
   await AboutConfigTest.withNewTab(async function() {
     let testPref = "browser.autofocus";
     // Click reset.
-    let row = this.getRow(PREF_BOOLEAN_DEFAULT_TRUE);
-    row.resetColumnButton.click();
+    let row = this.getRow(testPref);
+    row.element.lastChild.lastChild.click();
     // Check new layout and reset.
     Assert.ok(!row.hasClass("has-user-value"));
-    Assert.ok(!row.resetColumnButton);
-    Assert.ok(!Services.prefs.prefHasUserValue(PREF_BOOLEAN_DEFAULT_TRUE));
-    Assert.equal(this.getRow(PREF_BOOLEAN_DEFAULT_TRUE).value, "true");
+    Assert.equal(row.element.lastChild.childNodes.length, 0);
+    Assert.ok(!Services.prefs.prefHasUserValue(testPref));
+    Assert.equal(this.getRow(testPref).value, "" + Preferences.get(testPref));
 
     // Search for nothing to test gPrefArray
     this.search();
-    row = this.getRow(PREF_BOOLEAN_DEFAULT_TRUE);
+    row = this.getRow(testPref);
     Assert.ok(!row.hasClass("has-user-value"));
-    Assert.ok(!row.resetColumnButton);
-    Assert.equal(this.getRow(PREF_BOOLEAN_DEFAULT_TRUE).value, "true");
-
-    // Clicking reset on a localized preference without a corresponding value.
-    row = this.getRow(PREF_STRING_LOCALIZED_MISSING);
-    Assert.equal(row.value, "user-value");
-    row.resetColumnButton.click();
-    // Check new layout and reset.
-    Assert.ok(!row.hasClass("has-user-value"));
-    Assert.ok(!row.resetColumnButton);
-    Assert.ok(!Services.prefs.prefHasUserValue(PREF_STRING_LOCALIZED_MISSING));
-    Assert.equal(this.getRow(PREF_STRING_LOCALIZED_MISSING).value, "");
+    Assert.equal(row.element.lastChild.childNodes.length, 0);
+    Assert.equal(this.getRow(testPref).value, "" + Preferences.get(testPref));
   });
 });
 
 add_task(async function test_modify() {
   await AboutConfigTest.withNewTab(async function() {
     // Test toggle for boolean prefs.
     for (let nameOfBoolPref of [
       "test.aboutconfig.modify.boolean",
-      PREF_BOOLEAN_DEFAULT_TRUE,
+      "accessibility.typeaheadfind.autostart",
     ]) {
       let row = this.getRow(nameOfBoolPref);
       // Do this a two times to reset the pref.
       for (let i = 0; i < 2; i++) {
-        row.editColumnButton.click();
+        row.querySelector("td.cell-edit").firstChild.click();
         // Check new layout and saving in backend.
         Assert.equal(this.getRow(nameOfBoolPref).value,
           "" + Preferences.get(nameOfBoolPref));
         let prefHasUserValue = Services.prefs.prefHasUserValue(nameOfBoolPref);
         Assert.equal(row.hasClass("has-user-value"), prefHasUserValue);
-        Assert.equal(!!row.resetColumnButton, prefHasUserValue);
+        Assert.equal(row.element.lastChild.childNodes.length > 0, prefHasUserValue);
       }
     }
 
     // Test abort of edit by starting with string and continuing with editing Int pref.
     let row = this.getRow("test.aboutconfig.modify.string");
-    row.editColumnButton.click();
-    row.valueInput.value = "test";
+    row.querySelector("td.cell-edit").firstChild.click();
+    row.querySelector("td.cell-value").firstChild.firstChild.value = "test";
     let intRow = this.getRow("test.aboutconfig.modify.number");
-    intRow.editColumnButton.click();
-    Assert.equal(intRow.valueInput.value,
+    intRow.querySelector("td.cell-edit").firstChild.click();
+    Assert.equal(intRow.querySelector("td.cell-value").firstChild.firstChild.value,
       Preferences.get("test.aboutconfig.modify.number"));
-    Assert.ok(!row.valueInput);
-    Assert.equal(row.value, Preferences.get("test.aboutconfig.modify.string"));
+    Assert.equal(this.getRow("test.aboutconfig.modify.string").value,
+      "" + Preferences.get("test.aboutconfig.modify.string"));
+    Assert.equal(row.querySelector("td.cell-value").textContent,
+      Preferences.get("test.aboutconfig.modify.string"));
 
     // Test regex check for Int pref.
-    intRow.valueInput.value += "a";
-    intRow.editColumnButton.click();
-    Assert.ok(!intRow.valueInput.checkValidity());
+    intRow.querySelector("td.cell-value").firstChild.firstChild.value += "a";
+    intRow.querySelector("td.cell-edit").firstChild.click();
+    Assert.ok(!intRow.querySelector("td.cell-value").firstChild.firstChild.checkValidity());
 
     // Test correct saving and DOM-update.
     for (let prefName of [
       "test.aboutconfig.modify.string",
       "test.aboutconfig.modify.number",
-      PREF_NUMBER_DEFAULT_ZERO,
-      PREF_STRING_DEFAULT_EMPTY,
+      "accessibility.typeaheadfind.soundURL",
+      "accessibility.typeaheadfind.casesensitive",
     ]) {
       row = this.getRow(prefName);
       // Activate edit and check displaying.
-      row.editColumnButton.click();
-      Assert.equal(row.valueInput.value, Preferences.get(prefName));
-      row.valueInput.value = "42";
+      row.querySelector("td.cell-edit").firstChild.click();
+      Assert.equal(row.querySelector("td.cell-value").firstChild.firstChild.value,
+        Preferences.get(prefName));
+      row.querySelector("td.cell-value").firstChild.firstChild.value = "42";
       // Save and check saving.
-      row.editColumnButton.click();
+      row.querySelector("td.cell-edit").firstChild.click();
       Assert.equal(row.value, "" + Preferences.get(prefName));
       let prefHasUserValue = Services.prefs.prefHasUserValue(prefName);
-      Assert.equal(!!row.resetColumnButton, prefHasUserValue);
+      Assert.equal(row.element.lastChild.childNodes.length > 0, prefHasUserValue);
       Assert.equal(row.hasClass("has-user-value"), prefHasUserValue);
     }
   });
 });
--- a/browser/components/aboutconfig/test/browser/browser_locked.js
+++ b/browser/components/aboutconfig/test/browser/browser_locked.js
@@ -1,54 +1,51 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
-const PREF_STRING_NO_DEFAULT = "test.aboutconfig.a";
-
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
     set: [
-      [PREF_STRING_NO_DEFAULT, "some value"],
+      ["test.aboutconfig.a", "some value"],
     ],
   });
 });
 
 add_task(async function test_locked() {
   registerCleanupFunction(() => {
-    Services.prefs.unlockPref(PREF_STRING_DEFAULT_NOTEMPTY);
-    Services.prefs.unlockPref(PREF_BOOLEAN_DEFAULT_TRUE);
-    Services.prefs.unlockPref(PREF_STRING_NO_DEFAULT);
+    Services.prefs.unlockPref("browser.search.searchEnginesURL");
+    Services.prefs.unlockPref("test.aboutconfig.a");
+    Services.prefs.unlockPref("accessibility.AOM.enabled");
   });
 
-  Services.prefs.lockPref(PREF_STRING_DEFAULT_NOTEMPTY);
-  Services.prefs.lockPref(PREF_BOOLEAN_DEFAULT_TRUE);
-  Services.prefs.lockPref(PREF_STRING_NO_DEFAULT);
-
+  Services.prefs.lockPref("browser.search.searchEnginesURL");
+  Services.prefs.lockPref("test.aboutconfig.a");
+  Services.prefs.lockPref("accessibility.AOM.enabled");
   await AboutConfigTest.withNewTab(async function() {
     // Test locked default string pref.
-    let lockedPref = this.getRow(PREF_STRING_DEFAULT_NOTEMPTY);
+    let lockedPref = this.getRow("browser.search.searchEnginesURL");
     Assert.ok(lockedPref.hasClass("locked"));
-    Assert.equal(lockedPref.value, PREF_STRING_DEFAULT_NOTEMPTY_VALUE);
-    Assert.ok(lockedPref.editColumnButton.classList.contains("button-edit"));
-    Assert.ok(lockedPref.editColumnButton.disabled);
+    Assert.equal(lockedPref.value, "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
+    Assert.ok(lockedPref.firstButton.classList.contains("button-edit"));
+    Assert.ok(lockedPref.firstButton.disabled);
 
     // Test locked default boolean pref.
-    lockedPref = this.getRow(PREF_BOOLEAN_DEFAULT_TRUE);
+    lockedPref = this.getRow("accessibility.AOM.enabled");
     Assert.ok(lockedPref.hasClass("locked"));
-    Assert.equal(lockedPref.value, "true");
-    Assert.ok(lockedPref.editColumnButton.classList.contains("button-toggle"));
-    Assert.ok(lockedPref.editColumnButton.disabled);
+    Assert.equal(lockedPref.value, "false");
+    Assert.ok(lockedPref.firstButton.classList.contains("button-toggle"));
+    Assert.ok(lockedPref.firstButton.disabled);
 
     // Test locked user added pref.
-    lockedPref = this.getRow(PREF_STRING_NO_DEFAULT);
+    lockedPref = this.getRow("test.aboutconfig.a");
     Assert.ok(lockedPref.hasClass("locked"));
     Assert.equal(lockedPref.value, "");
-    Assert.ok(lockedPref.editColumnButton.classList.contains("button-edit"));
-    Assert.ok(lockedPref.editColumnButton.disabled);
+    Assert.ok(lockedPref.firstButton.classList.contains("button-edit"));
+    Assert.ok(lockedPref.firstButton.disabled);
 
-    // Test pref not locked.
-    let unlockedPref = this.getRow(PREF_BOOLEAN_USERVALUE_TRUE);
+    // Test pref not locked
+    let unlockedPref = this.getRow("accessibility.indicator.enabled");
     Assert.ok(!unlockedPref.hasClass("locked"));
-    Assert.equal(unlockedPref.value, "true");
-    Assert.ok(unlockedPref.editColumnButton.classList.contains("button-toggle"));
-    Assert.ok(!unlockedPref.editColumnButton.disabled);
+    Assert.equal(unlockedPref.value, "false");
+    Assert.ok(unlockedPref.firstButton.classList.contains("button-toggle"));
+    Assert.ok(!unlockedPref.firstButton.disabled);
   });
 });
--- a/browser/components/aboutconfig/test/browser/browser_search.js
+++ b/browser/components/aboutconfig/test/browser/browser_search.js
@@ -9,16 +9,17 @@ add_task(async function setup() {
       ["test.aboutconfig.b", "test value 3"],
     ],
   });
 });
 
 add_task(async function test_search() {
   await AboutConfigTest.withNewTab(async function() {
     let prefArray = Services.prefs.getChildList("");
+    await this.document.querySelector("button").click();
 
     // The total number of preferences may change at any time because of
     // operations running in the background, so we only test approximately.
     // The change in count would be because of one or two added preferences,
     // but we tolerate a difference of up to 50 preferences just to be safe.
     // We want thousands of prefs instead of a few dozen that are filtered.
     Assert.greater(this.rows.length, prefArray.length - 50);
 
--- a/browser/components/aboutconfig/test/browser/head.js
+++ b/browser/components/aboutconfig/test/browser/head.js
@@ -1,27 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 ChromeUtils.import("resource://gre/modules/Preferences.jsm", this);
 
-// List of default preferences that can be used for tests, chosen because they
-// have little or no side-effects when they are modified for a brief time. If
-// any of these preferences are removed or their default state changes, just
-// update the constant to point to a different preference with the same default.
-const PREF_BOOLEAN_DEFAULT_TRUE = "accessibility.typeaheadfind.manual";
-const PREF_BOOLEAN_USERVALUE_TRUE = "browser.dom.window.dump.enabled";
-const PREF_NUMBER_DEFAULT_ZERO = "accessibility.typeaheadfind.casesensitive";
-const PREF_STRING_DEFAULT_EMPTY = "browser.helperApps.neverAsk.openFile";
-const PREF_STRING_DEFAULT_NOTEMPTY = "accessibility.typeaheadfind.soundURL";
-const PREF_STRING_DEFAULT_NOTEMPTY_VALUE = "beep";
-const PREF_STRING_LOCALIZED_MISSING = "gecko.handlerService.schemes.irc.1.name";
-
 class AboutConfigRowTest {
   constructor(element) {
     this.element = element;
   }
 
   querySelector(selector) {
     return this.element.querySelector(selector);
   }
@@ -29,36 +17,18 @@ class AboutConfigRowTest {
   get name() {
     return this.querySelector("td").textContent;
   }
 
   get value() {
     return this.querySelector("td.cell-value").textContent;
   }
 
-  /**
-   * Text input field when the row is in edit mode.
-   */
-  get valueInput() {
-    return this.querySelector("td.cell-value input");
-  }
-
-  /**
-   * This is normally "edit" or "toggle" based on the preference type, or "save"
-   * when the row is in edit mode.
-   */
-  get editColumnButton() {
-    return this.querySelector("td.cell-edit > button");
-  }
-
-  /**
-   * This can be "reset" or "delete" based on whether a default exists.
-   */
-  get resetColumnButton() {
-    return this.querySelector("td:last-child > button");
+  get firstButton() {
+    return this.querySelector("button");
   }
 
   hasClass(className) {
     return this.element.classList.contains(className);
   }
 }
 
 class AboutConfigTest {