1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/tps/test_bug501528.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,79 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +/* 1.8 + * The list of phases mapped to their corresponding profiles. The object 1.9 + * here must be in strict JSON format, as it will get parsed by the Python 1.10 + * testrunner (no single quotes, extra comma's, etc). 1.11 + */ 1.12 +EnableEngines(["passwords"]); 1.13 + 1.14 +var phases = { "phase1": "profile1", 1.15 + "phase2": "profile2", 1.16 + "phase3": "profile1", 1.17 + "phase4": "profile2" }; 1.18 + 1.19 +/* 1.20 + * Password lists 1.21 + */ 1.22 + 1.23 +var passwords_initial = [ 1.24 + { hostname: "http://www.example.com", 1.25 + submitURL: "http://login.example.com", 1.26 + username: "joe", 1.27 + password: "secret", 1.28 + usernameField: "uname", 1.29 + passwordField: "pword", 1.30 + changes: { 1.31 + password: "SeCrEt$$$" 1.32 + } 1.33 + }, 1.34 + { hostname: "http://www.example.com", 1.35 + realm: "login", 1.36 + username: "jack", 1.37 + password: "secretlogin" 1.38 + } 1.39 +]; 1.40 + 1.41 +var passwords_after_first_update = [ 1.42 + { hostname: "http://www.example.com", 1.43 + submitURL: "http://login.example.com", 1.44 + username: "joe", 1.45 + password: "SeCrEt$$$", 1.46 + usernameField: "uname", 1.47 + passwordField: "pword" 1.48 + }, 1.49 + { hostname: "http://www.example.com", 1.50 + realm: "login", 1.51 + username: "jack", 1.52 + password: "secretlogin" 1.53 + } 1.54 +]; 1.55 + 1.56 +/* 1.57 + * Test phases 1.58 + */ 1.59 + 1.60 +Phase('phase1', [ 1.61 + [Passwords.add, passwords_initial], 1.62 + [Sync] 1.63 +]); 1.64 + 1.65 +Phase('phase2', [ 1.66 + [Passwords.add, passwords_initial], 1.67 + [Sync] 1.68 +]); 1.69 + 1.70 +Phase('phase3', [ 1.71 + [Sync], 1.72 + [Passwords.verify, passwords_initial], 1.73 + [Passwords.modify, passwords_initial], 1.74 + [Passwords.verify, passwords_after_first_update], 1.75 + [Sync] 1.76 +]); 1.77 + 1.78 +Phase('phase4', [ 1.79 + [Sync], 1.80 + [Passwords.verify, passwords_after_first_update], 1.81 +]); 1.82 +