services/sync/tests/tps/test_bug530717.js

Wed, 31 Dec 2014 07:53:36 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:53:36 +0100
branch
TOR_BUG_3246
changeset 5
4ab42b5ab56c
permissions
-rw-r--r--

Correct small whitespace inconsistency, lost while renaming variables.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 /*
     5  * The list of phases mapped to their corresponding profiles.  The object
     6  * here must be in strict JSON format, as it will get parsed by the Python
     7  * testrunner (no single quotes, extra comma's, etc).
     8  */
     9 EnableEngines(["prefs"]);
    11 var phases = { "phase1": "profile1",
    12                "phase2": "profile2",
    13                "phase3": "profile1"};
    15 /*
    16  * Preference lists
    17  */
    19 var prefs1 = [
    20   { name: "browser.startup.homepage",
    21     value: "http://www.getfirefox.com"
    22   },
    23   { name: "browser.urlbar.maxRichResults",
    24     value: 20
    25   },
    26   { name: "security.OCSP.require",
    27     value: true
    28   }
    29 ];
    31 var prefs2 = [
    32   { name: "browser.startup.homepage",
    33     value: "http://www.mozilla.com"
    34   },
    35   { name: "browser.urlbar.maxRichResults",
    36     value: 18
    37   },
    38   { name: "security.OCSP.require",
    39     value: false
    40   }
    41 ];
    43 /*
    44  * Test phases
    45  */
    47 // Add prefs to profile1 and sync.
    48 Phase('phase1', [
    49   [Prefs.modify, prefs1],
    50   [Prefs.verify, prefs1],
    51   [Sync]
    52 ]);
    54 // Sync profile2 and verify same prefs are present.
    55 Phase('phase2', [
    56   [Sync],
    57   [Prefs.verify, prefs1]
    58 ]);
    60 // Using profile1, change some prefs, then do another sync with wipe-client.
    61 // Verify that the cloud's prefs are restored, and the recent local changes
    62 // discarded.
    63 Phase('phase3', [
    64   [Prefs.modify, prefs2],
    65   [Prefs.verify, prefs2],
    66   [Sync, SYNC_WIPE_CLIENT],
    67   [Prefs.verify, prefs1]
    68 ]);

mercurial