Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
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(["forms"]); |
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 | * Form data |
michael@0 | 18 | */ |
michael@0 | 19 | |
michael@0 | 20 | // the form data to add to the browser |
michael@0 | 21 | var formdata1 = [ |
michael@0 | 22 | { fieldname: "name", |
michael@0 | 23 | value: "xyz", |
michael@0 | 24 | date: -1 |
michael@0 | 25 | }, |
michael@0 | 26 | { fieldname: "email", |
michael@0 | 27 | value: "abc@gmail.com", |
michael@0 | 28 | date: -2 |
michael@0 | 29 | }, |
michael@0 | 30 | { fieldname: "username", |
michael@0 | 31 | value: "joe" |
michael@0 | 32 | } |
michael@0 | 33 | ]; |
michael@0 | 34 | |
michael@0 | 35 | // the form data to add in private browsing mode |
michael@0 | 36 | var formdata2 = [ |
michael@0 | 37 | { fieldname: "password", |
michael@0 | 38 | value: "secret", |
michael@0 | 39 | date: -1 |
michael@0 | 40 | }, |
michael@0 | 41 | { fieldname: "city", |
michael@0 | 42 | value: "mtview" |
michael@0 | 43 | } |
michael@0 | 44 | ]; |
michael@0 | 45 | |
michael@0 | 46 | /* |
michael@0 | 47 | * Test phases |
michael@0 | 48 | */ |
michael@0 | 49 | |
michael@0 | 50 | Phase('phase1', [ |
michael@0 | 51 | [Formdata.add, formdata1], |
michael@0 | 52 | [Formdata.verify, formdata1], |
michael@0 | 53 | [Sync] |
michael@0 | 54 | ]); |
michael@0 | 55 | |
michael@0 | 56 | Phase('phase2', [ |
michael@0 | 57 | [Sync], |
michael@0 | 58 | [Formdata.verify, formdata1] |
michael@0 | 59 | ]); |
michael@0 | 60 | |
michael@0 | 61 | Phase('phase3', [ |
michael@0 | 62 | [Sync], |
michael@0 | 63 | [Windows.add, { private: true }], |
michael@0 | 64 | [Formdata.add, formdata2], |
michael@0 | 65 | [Formdata.verify, formdata2], |
michael@0 | 66 | [Sync], |
michael@0 | 67 | ]); |
michael@0 | 68 | |
michael@0 | 69 | Phase('phase4', [ |
michael@0 | 70 | [Sync], |
michael@0 | 71 | [Formdata.verify, formdata1], |
michael@0 | 72 | [Formdata.verifyNot, formdata2] |
michael@0 | 73 | ]); |