michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /* michael@0: * The list of phases mapped to their corresponding profiles. The object michael@0: * here must be in strict JSON format, as it will get parsed by the Python michael@0: * testrunner (no single quotes, extra comma's, etc). michael@0: */ michael@0: EnableEngines(["passwords"]); michael@0: michael@0: var phases = { "phase1": "profile1", michael@0: "phase2": "profile2", michael@0: "phase3": "profile1", michael@0: "phase4": "profile2" }; michael@0: michael@0: /* michael@0: * Password data michael@0: */ michael@0: michael@0: // Initial password data michael@0: var passwords_initial = [ michael@0: { hostname: "http://www.example.com", michael@0: submitURL: "http://login.example.com", michael@0: username: "joe", michael@0: password: "secret", michael@0: usernameField: "uname", michael@0: passwordField: "pword", michael@0: changes: { michael@0: password: "SeCrEt$$$" michael@0: } michael@0: }, michael@0: { hostname: "http://www.example.com", michael@0: realm: "login", michael@0: username: "jack", michael@0: password: "secretlogin" michael@0: } michael@0: ]; michael@0: michael@0: // Password after first modify action has been performed michael@0: var passwords_after_first_change = [ michael@0: { hostname: "http://www.example.com", michael@0: submitURL: "http://login.example.com", michael@0: username: "joe", michael@0: password: "SeCrEt$$$", michael@0: usernameField: "uname", michael@0: passwordField: "pword", michael@0: changes: { michael@0: username: "james" michael@0: } michael@0: }, michael@0: { hostname: "http://www.example.com", michael@0: realm: "login", michael@0: username: "jack", michael@0: password: "secretlogin" michael@0: } michael@0: ]; michael@0: michael@0: // Password after second modify action has been performed michael@0: var passwords_after_second_change = [ michael@0: { hostname: "http://www.example.com", michael@0: submitURL: "http://login.example.com", michael@0: username: "james", michael@0: password: "SeCrEt$$$", michael@0: usernameField: "uname", michael@0: passwordField: "pword" michael@0: }, michael@0: { hostname: "http://www.example.com", michael@0: realm: "login", michael@0: username: "jack", michael@0: password: "secretlogin" michael@0: } michael@0: ]; michael@0: michael@0: /* michael@0: * Test phases michael@0: */ michael@0: michael@0: Phase('phase1', [ michael@0: [Passwords.add, passwords_initial], michael@0: [Sync] michael@0: ]); michael@0: michael@0: Phase('phase2', [ michael@0: [Sync], michael@0: [Passwords.verify, passwords_initial], michael@0: [Passwords.modify, passwords_initial], michael@0: [Passwords.verify, passwords_after_first_change], michael@0: [Sync] michael@0: ]); michael@0: michael@0: Phase('phase3', [ michael@0: [Sync], michael@0: [Windows.add, { private: true }], michael@0: [Passwords.verify, passwords_after_first_change], michael@0: [Passwords.modify, passwords_after_first_change], michael@0: [Passwords.verify, passwords_after_second_change], michael@0: [Sync] michael@0: ]); michael@0: michael@0: Phase('phase4', [ michael@0: [Sync], michael@0: [Passwords.verify, passwords_after_second_change] michael@0: ]); michael@0: