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(["forms"]); 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: * Form data michael@0: */ michael@0: michael@0: // the form data to add to the browser michael@0: var formdata1 = [ michael@0: { fieldname: "name", michael@0: value: "xyz", michael@0: date: -1 michael@0: }, michael@0: { fieldname: "email", michael@0: value: "abc@gmail.com", michael@0: date: -2 michael@0: }, michael@0: { fieldname: "username", michael@0: value: "joe" michael@0: } michael@0: ]; michael@0: michael@0: // the form data to add in private browsing mode michael@0: var formdata2 = [ michael@0: { fieldname: "password", michael@0: value: "secret", michael@0: date: -1 michael@0: }, michael@0: { fieldname: "city", michael@0: value: "mtview" michael@0: } michael@0: ]; michael@0: michael@0: /* michael@0: * Test phases michael@0: */ michael@0: michael@0: Phase('phase1', [ michael@0: [Formdata.add, formdata1], michael@0: [Formdata.verify, formdata1], michael@0: [Sync] michael@0: ]); michael@0: michael@0: Phase('phase2', [ michael@0: [Sync], michael@0: [Formdata.verify, formdata1] michael@0: ]); michael@0: michael@0: Phase('phase3', [ michael@0: [Sync], michael@0: [Windows.add, { private: true }], michael@0: [Formdata.add, formdata2], michael@0: [Formdata.verify, formdata2], michael@0: [Sync], michael@0: ]); michael@0: michael@0: Phase('phase4', [ michael@0: [Sync], michael@0: [Formdata.verify, formdata1], michael@0: [Formdata.verifyNot, formdata2] michael@0: ]);