[tbb-commits] [tor-browser] 40/76: Bug 1743384 - add test, r=mconley a=test-only

gitolite role git at cupani.torproject.org
Wed Mar 30 20:40:08 UTC 2022


This is an automated email from the git hooks/post-receive script.

richard pushed a commit to branch tor-browser-91.8.0esr-11.0-1
in repository tor-browser.

commit 33e46d7f8d76b23f538fd90e225e398b803b667d
Author: Gijs Kruitbosch <gijskruitbosch at gmail.com>
AuthorDate: Wed Feb 23 12:57:08 2022 +0000

    Bug 1743384 - add test, r=mconley a=test-only
    
    Differential Revision: https://phabricator.services.mozilla.com/D132350
---
 toolkit/modules/tests/browser/browser_Troubleshoot.js | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js
index 8cf7b5e189b71..a2e475eabe9de 100644
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js
@@ -101,27 +101,35 @@ var tests = [
       Services.prefs.setBoolPref(p, true);
       is(Services.prefs.getBoolPref(p), true, "The pref should be set: " + p);
     });
+    Services.prefs.setCharPref("dom.push.userAgentID", "testvalue");
     Troubleshoot.snapshot(function(snapshot) {
       let p = snapshot.modifiedPreferences;
       is(
         p["javascript.troubleshoot"],
         true,
-        "The pref should be present because it's whitelisted " +
-          "but not blacklisted."
+        "The pref should be present because it's in the allowed prefs " +
+          "and not in the pref regexes that are disallowed."
       );
       ok(
         !("troubleshoot.foo" in p),
-        "The pref should be absent because it's not in the whitelist."
+        "The pref should be absent because it's not in the allowed prefs."
       );
       ok(
         !("network.proxy.troubleshoot" in p),
-        "The pref should be absent because it's blacklisted."
+        "The pref should be absent because it's in the pref regexes " +
+          "that are disallowed."
+      );
+      ok(
+        !("dom.push.userAgentID" in p),
+        "The pref should be absent because it's in the pref regexes " +
+          "that are disallowed."
       );
       ok(
         !("print.print_to_filename" in p),
-        "The pref should be absent because it's not whitelisted."
+        "The pref should be absent because it's not in the allowed prefs."
       );
       prefs.forEach(p => Services.prefs.deleteBranch(p));
+      Services.prefs.clearUserPref("dom.push.userAgentID");
       done();
     });
   },

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the tbb-commits mailing list