PageRenderTime 15ms CodeModel.GetById 2ms app.highlight 8ms RepoModel.GetById 2ms app.codeStats 0ms

/services/sync/tests/tps/test_bug501528.js

http://github.com/zpao/v8monkey
JavaScript | 79 lines | 55 code | 11 blank | 13 comment | 0 complexity | c58c324eda4e1ee4dc22dc5d9710f276 MD5 | raw file
 1/* Any copyright is dedicated to the Public Domain.
 2   http://creativecommons.org/publicdomain/zero/1.0/ */
 3
 4/*
 5 * The list of phases mapped to their corresponding profiles.  The object
 6 * here must be in strict JSON format, as it will get parsed by the Python
 7 * testrunner (no single quotes, extra comma's, etc).
 8 */
 9EnableEngines(["passwords"]);
10
11var phases = { "phase1": "profile1",
12               "phase2": "profile2",
13               "phase3": "profile1",
14               "phase4": "profile2" };
15
16/*
17 * Password lists
18 */
19
20var passwords_initial = [
21  { hostname: "http://www.example.com",
22    submitURL: "http://login.example.com",
23    username: "joe",
24    password: "secret",
25    usernameField: "uname",
26    passwordField: "pword",
27    changes: {
28      password: "SeCrEt$$$"
29    }
30  },
31  { hostname: "http://www.example.com",
32    realm: "login",
33    username: "jack",
34    password: "secretlogin"
35  }
36];
37
38var passwords_after_first_update = [
39  { hostname: "http://www.example.com",
40    submitURL: "http://login.example.com",
41    username: "joe",
42    password: "SeCrEt$$$",
43    usernameField: "uname",
44    passwordField: "pword"
45  },
46  { hostname: "http://www.example.com",
47    realm: "login",
48    username: "jack",
49    password: "secretlogin"
50  }
51];
52
53/*
54 * Test phases
55 */
56
57Phase('phase1', [
58  [Passwords.add, passwords_initial],
59  [Sync]
60]);
61
62Phase('phase2', [
63  [Passwords.add, passwords_initial],
64  [Sync]
65]);
66
67Phase('phase3', [
68  [Sync],
69  [Passwords.verify, passwords_initial],
70  [Passwords.modify, passwords_initial],
71  [Passwords.verify, passwords_after_first_update],
72  [Sync]
73]);
74
75Phase('phase4', [
76  [Sync],
77  [Passwords.verify, passwords_after_first_update],
78]);
79