tor-browser

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

test_tabs.js (1005B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 EnableEngines(["tabs"]);
      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 /*
     14 * Tab lists.
     15 */
     16 
     17 var tabs1 = [
     18  { uri: "https://www.mozilla.org/en-US/firefox/", profile: "profile1" },
     19  {
     20    uri: "https://example.com/",
     21    title: "Example Domain",
     22    profile: "profile1",
     23  },
     24 ];
     25 
     26 var tabs2 = [
     27  { uri: "https://www.mozilla.org/en-US/contribute/", profile: "profile2" },
     28  {
     29    uri: "https://example.com/",
     30    profile: "profile2",
     31  },
     32 ];
     33 
     34 /*
     35 * Test phases
     36 */
     37 
     38 Phase("phase1", [[Tabs.add, tabs1], [Sync]]);
     39 
     40 Phase("phase2", [[Sync], [Tabs.verify, tabs1], [Tabs.add, tabs2], [Sync]]);
     41 
     42 Phase("phase3", [[Sync], [Tabs.verify, tabs2]]);