tor-browser

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

test_bug501528.js (1653B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 EnableEngines(["passwords"]);
      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 = {
     12  phase1: "profile1",
     13  phase2: "profile2",
     14  phase3: "profile1",
     15  phase4: "profile2",
     16 };
     17 
     18 /*
     19 * Password lists
     20 */
     21 
     22 var passwords_initial = [
     23  {
     24    hostname: "http://www.example.com",
     25    submitURL: "http://login.example.com",
     26    username: "joe",
     27    password: "secret",
     28    usernameField: "uname",
     29    passwordField: "pword",
     30    changes: {
     31      password: "SeCrEt$$$",
     32    },
     33  },
     34  {
     35    hostname: "http://www.example.com",
     36    realm: "login",
     37    username: "jack",
     38    password: "secretlogin",
     39  },
     40 ];
     41 
     42 var passwords_after_first_update = [
     43  {
     44    hostname: "http://www.example.com",
     45    submitURL: "http://login.example.com",
     46    username: "joe",
     47    password: "SeCrEt$$$",
     48    usernameField: "uname",
     49    passwordField: "pword",
     50  },
     51  {
     52    hostname: "http://www.example.com",
     53    realm: "login",
     54    username: "jack",
     55    password: "secretlogin",
     56  },
     57 ];
     58 
     59 /*
     60 * Test phases
     61 */
     62 
     63 Phase("phase1", [[Passwords.add, passwords_initial], [Sync]]);
     64 
     65 Phase("phase2", [[Passwords.add, passwords_initial], [Sync]]);
     66 
     67 Phase("phase3", [
     68  [Sync],
     69  [Passwords.verify, passwords_initial],
     70  [Passwords.modify, passwords_initial],
     71  [Passwords.verify, passwords_after_first_update],
     72  [Sync],
     73 ]);
     74 
     75 Phase("phase4", [[Sync], [Passwords.verify, passwords_after_first_update]]);