Bug 1516340 - Properly clean up prefs in browser_contentblocking.js. r=ewright
authorJohann Hofmann <jhofmann@mozilla.com>
Thu, 10 Jan 2019 14:46:00 +0000
changeset 510388 993c073ab27a61d60a3f4aafbe4d1ef7d80fae38
parent 510387 3fc0d08d2c0db25a55e18c590a6b3b25a5f3d15c
child 510389 392036709e44d5edf28a4dee2baf4f9c457e2e0a
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)
reviewersewright
bugs1516340
milestone66.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 1516340 - Properly clean up prefs in browser_contentblocking.js. r=ewright Differential Revision: https://phabricator.services.mozilla.com/D16030
browser/components/preferences/in-content/tests/browser_contentblocking.js
--- a/browser/components/preferences/in-content/tests/browser_contentblocking.js
+++ b/browser/components/preferences/in-content/tests/browser_contentblocking.js
@@ -247,16 +247,20 @@ add_task(async function testContentBlock
   default:
     ok(false, "Unexpected default value found for " + NCB_PREF + ": " + defaultNCB);
     break;
   }
   Services.prefs.setIntPref(NCB_PREF, nonDefaultNCB);
   await TestUtils.waitForCondition(() => Services.prefs.prefHasUserValue(NCB_PREF));
   is(Services.prefs.getStringPref(CAT_PREF), "custom", `${CAT_PREF} has been set to custom`);
 
+  for (let pref of prefs) {
+    SpecialPowers.clearUserPref(pref);
+  }
+
   gBrowser.removeCurrentTab();
 });
 
 function checkControlState(doc, controls, enabled) {
   for (let selector of controls) {
     for (let control of doc.querySelectorAll(selector)) {
       if (enabled) {
         ok(!control.hasAttribute("disabled"), `${selector} is enabled.`);