services/sync/tests/tps/test_addon_restartless_xpi.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.

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 // This test verifies that install of restartless extensions syncs to
michael@0 5 // other profiles.
michael@0 6 EnableEngines(["addons"]);
michael@0 7
michael@0 8 let phases = {
michael@0 9 "phase01": "profile1",
michael@0 10 "phase02": "profile2",
michael@0 11 "phase03": "profile1",
michael@0 12 "phase04": "profile2",
michael@0 13 "phase05": "profile1",
michael@0 14 "phase06": "profile2",
michael@0 15 "phase07": "profile1",
michael@0 16 "phase08": "profile2"
michael@0 17 };
michael@0 18
michael@0 19 const id = "restartless-xpi@tests.mozilla.org";
michael@0 20
michael@0 21 // Verify install is synced
michael@0 22 Phase("phase01", [
michael@0 23 [Addons.verifyNot, [id]],
michael@0 24 [Addons.install, [id]],
michael@0 25 [Addons.verify, [id], STATE_ENABLED],
michael@0 26 [Sync]
michael@0 27 ]);
michael@0 28 Phase("phase02", [
michael@0 29 [Addons.verifyNot, [id]],
michael@0 30 [Sync],
michael@0 31 [Addons.verify, [id], STATE_ENABLED]
michael@0 32 ]);
michael@0 33
michael@0 34 // Now disable and see that is is synced.
michael@0 35 Phase("phase03", [
michael@0 36 [EnsureTracking],
michael@0 37 [Addons.setEnabled, [id], STATE_DISABLED],
michael@0 38 [Addons.verify, [id], STATE_DISABLED],
michael@0 39 [Sync]
michael@0 40 ]);
michael@0 41 Phase("phase04", [
michael@0 42 [Sync],
michael@0 43 [Addons.verify, [id], STATE_DISABLED]
michael@0 44 ]);
michael@0 45
michael@0 46 // Enable and see it is synced.
michael@0 47 Phase("phase05", [
michael@0 48 [EnsureTracking],
michael@0 49 [Addons.setEnabled, [id], STATE_ENABLED],
michael@0 50 [Addons.verify, [id], STATE_ENABLED],
michael@0 51 [Sync]
michael@0 52 ]);
michael@0 53 Phase("phase06", [
michael@0 54 [Sync],
michael@0 55 [Addons.verify, [id], STATE_ENABLED]
michael@0 56 ]);
michael@0 57
michael@0 58 // Uninstall and see it is synced.
michael@0 59 Phase("phase07", [
michael@0 60 [EnsureTracking],
michael@0 61 [Addons.verify, [id], STATE_ENABLED],
michael@0 62 [Addons.uninstall, [id]],
michael@0 63 [Addons.verifyNot, [id]],
michael@0 64 [Sync]
michael@0 65 ]);
michael@0 66 Phase("phase08", [
michael@0 67 [Addons.verify, [id], STATE_ENABLED],
michael@0 68 [Sync],
michael@0 69 [Addons.verifyNot, [id]]
michael@0 70 ]);

mercurial