michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: // This test verifies that install of restartless extensions syncs to michael@0: // other profiles. michael@0: EnableEngines(["addons"]); michael@0: michael@0: let phases = { michael@0: "phase01": "profile1", michael@0: "phase02": "profile2", michael@0: "phase03": "profile1", michael@0: "phase04": "profile2", michael@0: "phase05": "profile1", michael@0: "phase06": "profile2", michael@0: "phase07": "profile1", michael@0: "phase08": "profile2" michael@0: }; michael@0: michael@0: const id = "restartless-xpi@tests.mozilla.org"; michael@0: michael@0: // Verify install is synced michael@0: Phase("phase01", [ michael@0: [Addons.verifyNot, [id]], michael@0: [Addons.install, [id]], michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase02", [ michael@0: [Addons.verifyNot, [id]], michael@0: [Sync], michael@0: [Addons.verify, [id], STATE_ENABLED] michael@0: ]); michael@0: michael@0: // Now disable and see that is is synced. michael@0: Phase("phase03", [ michael@0: [EnsureTracking], michael@0: [Addons.setEnabled, [id], STATE_DISABLED], michael@0: [Addons.verify, [id], STATE_DISABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase04", [ michael@0: [Sync], michael@0: [Addons.verify, [id], STATE_DISABLED] michael@0: ]); michael@0: michael@0: // Enable and see it is synced. michael@0: Phase("phase05", [ michael@0: [EnsureTracking], michael@0: [Addons.setEnabled, [id], STATE_ENABLED], michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase06", [ michael@0: [Sync], michael@0: [Addons.verify, [id], STATE_ENABLED] michael@0: ]); michael@0: michael@0: // Uninstall and see it is synced. michael@0: Phase("phase07", [ michael@0: [EnsureTracking], michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Addons.uninstall, [id]], michael@0: [Addons.verifyNot, [id]], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase08", [ michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Sync], michael@0: [Addons.verifyNot, [id]] michael@0: ]);