services/sync/tests/tps/test_bug530717.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

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(["prefs"]);
michael@0 10
michael@0 11 var phases = { "phase1": "profile1",
michael@0 12 "phase2": "profile2",
michael@0 13 "phase3": "profile1"};
michael@0 14
michael@0 15 /*
michael@0 16 * Preference lists
michael@0 17 */
michael@0 18
michael@0 19 var prefs1 = [
michael@0 20 { name: "browser.startup.homepage",
michael@0 21 value: "http://www.getfirefox.com"
michael@0 22 },
michael@0 23 { name: "browser.urlbar.maxRichResults",
michael@0 24 value: 20
michael@0 25 },
michael@0 26 { name: "security.OCSP.require",
michael@0 27 value: true
michael@0 28 }
michael@0 29 ];
michael@0 30
michael@0 31 var prefs2 = [
michael@0 32 { name: "browser.startup.homepage",
michael@0 33 value: "http://www.mozilla.com"
michael@0 34 },
michael@0 35 { name: "browser.urlbar.maxRichResults",
michael@0 36 value: 18
michael@0 37 },
michael@0 38 { name: "security.OCSP.require",
michael@0 39 value: false
michael@0 40 }
michael@0 41 ];
michael@0 42
michael@0 43 /*
michael@0 44 * Test phases
michael@0 45 */
michael@0 46
michael@0 47 // Add prefs to profile1 and sync.
michael@0 48 Phase('phase1', [
michael@0 49 [Prefs.modify, prefs1],
michael@0 50 [Prefs.verify, prefs1],
michael@0 51 [Sync]
michael@0 52 ]);
michael@0 53
michael@0 54 // Sync profile2 and verify same prefs are present.
michael@0 55 Phase('phase2', [
michael@0 56 [Sync],
michael@0 57 [Prefs.verify, prefs1]
michael@0 58 ]);
michael@0 59
michael@0 60 // Using profile1, change some prefs, then do another sync with wipe-client.
michael@0 61 // Verify that the cloud's prefs are restored, and the recent local changes
michael@0 62 // discarded.
michael@0 63 Phase('phase3', [
michael@0 64 [Prefs.modify, prefs2],
michael@0 65 [Prefs.verify, prefs2],
michael@0 66 [Sync, SYNC_WIPE_CLIENT],
michael@0 67 [Prefs.verify, prefs1]
michael@0 68 ]);
michael@0 69

mercurial