services/sync/tests/tps/test_addon_wipe.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/services/sync/tests/tps/test_addon_wipe.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,34 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +// This test ensures that a client wipe followed by an "initial" sync will
     1.8 +// restore add-ons. This test should expose flaws in the reconciling logic,
     1.9 +// specifically around AddonsReconciler. This test is in response to bug
    1.10 +// 792990.
    1.11 +
    1.12 +EnableEngines(["addons"]);
    1.13 +
    1.14 +let phases = {
    1.15 +  "phase01": "profile1",
    1.16 +  "phase02": "profile1",
    1.17 +  "phase03": "profile1"
    1.18 +};
    1.19 +
    1.20 +const id1 = "restartless-xpi@tests.mozilla.org";
    1.21 +const id2 = "unsigned-xpi@tests.mozilla.org";
    1.22 +
    1.23 +Phase("phase01", [
    1.24 +  [Addons.install, [id1]],
    1.25 +  [Addons.install, [id2]],
    1.26 +  [Sync]
    1.27 +]);
    1.28 +Phase("phase02", [
    1.29 +  [Addons.verify, [id1], STATE_ENABLED],
    1.30 +  [Addons.verify, [id2], STATE_ENABLED],
    1.31 +  [Sync, SYNC_WIPE_CLIENT],
    1.32 +  [Sync]
    1.33 +]);
    1.34 +Phase("phase03", [
    1.35 +  [Addons.verify, [id1], STATE_ENABLED],
    1.36 +  [Addons.verify, [id2], STATE_ENABLED]
    1.37 +]);

mercurial