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