tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_prefs.js (1116B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 EnableEngines(["prefs"]);
      5 
      6 /*
      7 * The list of phases mapped to their corresponding profiles.  The object
      8 * here must be in JSON format as it will get parsed by the Python
      9 * testrunner. It is parsed by the YAML package, so it relatively flexible.
     10 */
     11 var phases = { phase1: "profile1", phase2: "profile2", phase3: "profile1" };
     12 
     13 var prefs1 = [
     14  { name: "browser.startup.homepage", value: "http://www.getfirefox.com" },
     15  { name: "browser.urlbar.maxRichResults", value: 20 },
     16  { name: "privacy.clearOnShutdown.siteSettings", value: true },
     17 ];
     18 
     19 var prefs2 = [
     20  { name: "browser.startup.homepage", value: "http://www.mozilla.com" },
     21  { name: "browser.urlbar.maxRichResults", value: 18 },
     22  { name: "privacy.clearOnShutdown.siteSettings", value: false },
     23 ];
     24 
     25 Phase("phase1", [[Prefs.modify, prefs1], [Prefs.verify, prefs1], [Sync]]);
     26 
     27 Phase("phase2", [
     28  [Sync],
     29  [Prefs.verify, prefs1],
     30  [Prefs.modify, prefs2],
     31  [Prefs.verify, prefs2],
     32  [Sync],
     33 ]);
     34 
     35 Phase("phase3", [[Sync], [Prefs.verify, prefs2]]);