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(["prefs"]); michael@0: michael@0: var phases = { "phase1": "profile1", michael@0: "phase2": "profile2", michael@0: "phase3": "profile1"}; michael@0: michael@0: /* michael@0: * Preference lists michael@0: */ michael@0: michael@0: var prefs1 = [ michael@0: { name: "browser.startup.homepage", michael@0: value: "http://www.getfirefox.com" michael@0: }, michael@0: { name: "browser.urlbar.maxRichResults", michael@0: value: 20 michael@0: }, michael@0: { name: "security.OCSP.require", michael@0: value: true michael@0: } michael@0: ]; michael@0: michael@0: var prefs2 = [ michael@0: { name: "browser.startup.homepage", michael@0: value: "http://www.mozilla.com" michael@0: }, michael@0: { name: "browser.urlbar.maxRichResults", michael@0: value: 18 michael@0: }, michael@0: { name: "security.OCSP.require", michael@0: value: false michael@0: } michael@0: ]; michael@0: michael@0: /* michael@0: * Test phases michael@0: */ michael@0: michael@0: // Add prefs to profile1 and sync. michael@0: Phase('phase1', [ michael@0: [Prefs.modify, prefs1], michael@0: [Prefs.verify, prefs1], michael@0: [Sync] michael@0: ]); michael@0: michael@0: // Sync profile2 and verify same prefs are present. michael@0: Phase('phase2', [ michael@0: [Sync], michael@0: [Prefs.verify, prefs1] michael@0: ]); michael@0: michael@0: // Using profile1, change some prefs, then do another sync with wipe-client. michael@0: // Verify that the cloud's prefs are restored, and the recent local changes michael@0: // discarded. michael@0: Phase('phase3', [ michael@0: [Prefs.modify, prefs2], michael@0: [Prefs.verify, prefs2], michael@0: [Sync, SYNC_WIPE_CLIENT], michael@0: [Prefs.verify, prefs1] michael@0: ]); michael@0: