Bug 1502856 - Fix intermittent failure surfaced by test-verify. r=me
authorPaolo Amadini <paolo.mozmail@amadzone.org>
Thu, 29 Nov 2018 15:12:24 +0000
changeset 505208 0177a4902e5ecae53bed1e56f373bbc526168be7
parent 505207 c549579400edce070e88f8f684b4da38b190336c
child 505209 5593c533a22d521a9b2a1392c81fb34d75bd1563
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1502856
milestone65.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 1502856 - Fix intermittent failure surfaced by test-verify. r=me Just waiting for l10n.ready isn't enough, so the test now verifies the button class instead of its text content.
browser/components/aboutconfig/test/browser/browser_locked.js
--- a/browser/components/aboutconfig/test/browser/browser_locked.js
+++ b/browser/components/aboutconfig/test/browser/browser_locked.js
@@ -37,34 +37,34 @@ add_task(async function test_locked() {
       function getButton(name) {
         return getRow(name).querySelector("button");
       }
 
       // Test locked default string pref.
       let lockedPref = getRow("browser.search.searchEnginesURL");
       Assert.ok(lockedPref.classList.contains("locked"));
       Assert.equal(getValue("browser.search.searchEnginesURL"), "https://addons.mozilla.org/%LOCALE%/firefox/search-engines/");
-      Assert.equal(getButton("browser.search.searchEnginesURL").textContent, "Edit");
+      Assert.ok(getButton("browser.search.searchEnginesURL").classList.contains("button-edit"));
       Assert.equal(getButton("browser.search.searchEnginesURL").disabled, true);
 
       // Test locked default boolean pref.
       lockedPref = getRow("accessibility.AOM.enabled");
       Assert.ok(lockedPref.classList.contains("locked"));
       Assert.equal(getValue("accessibility.AOM.enabled"), "false");
-      Assert.equal(getButton("accessibility.AOM.enabled").textContent, "Toggle");
+      Assert.ok(getButton("accessibility.AOM.enabled").classList.contains("button-toggle"));
       Assert.equal(getButton("accessibility.AOM.enabled").disabled, true);
 
       // Test locked user added pref.
       lockedPref = getRow("test.aboutconfig.a");
       Assert.ok(lockedPref.classList.contains("locked"));
       Assert.equal(getValue("test.aboutconfig.a"), "");
-      Assert.equal(getButton("test.aboutconfig.a").textContent, "Edit");
+      Assert.ok(getButton("test.aboutconfig.a").classList.contains("button-edit"));
       Assert.equal(getButton("test.aboutconfig.a").disabled, true);
 
       // Test pref not locked
       let unlockedPref = getRow("accessibility.indicator.enabled");
       Assert.equal(unlockedPref.classList.contains("locked"), false);
       Assert.equal(getValue("accessibility.indicator.enabled"), "false");
-      Assert.equal(getButton("accessibility.indicator.enabled").textContent, "Toggle");
+      Assert.ok(getButton("accessibility.indicator.enabled").classList.contains("button-toggle"));
       Assert.equal(getButton("accessibility.indicator.enabled").disabled, false);
     });
   });
 });