michael@0: 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 extensions that require restart michael@0: // syncs between profiles. michael@0: EnableEngines(["addons"]); michael@0: michael@0: let phases = { michael@0: "phase01": "profile1", michael@0: "phase02": "profile1", michael@0: "phase03": "profile2", michael@0: "phase04": "profile2", michael@0: "phase05": "profile1", michael@0: "phase06": "profile1", michael@0: "phase07": "profile2", michael@0: "phase08": "profile2", michael@0: "phase09": "profile1", michael@0: "phase10": "profile1", michael@0: "phase11": "profile2", michael@0: "phase12": "profile2", michael@0: "phase13": "profile1", michael@0: "phase14": "profile1", michael@0: "phase15": "profile2", michael@0: "phase16": "profile2" michael@0: }; michael@0: michael@0: const id = "unsigned-xpi@tests.mozilla.org"; michael@0: michael@0: Phase("phase01", [ michael@0: [Addons.verifyNot, [id]], michael@0: [Addons.install, [id]], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase02", [ michael@0: [Addons.verify, [id], STATE_ENABLED] michael@0: ]); michael@0: Phase("phase03", [ michael@0: [Addons.verifyNot, [id]], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase04", [ michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: ]); michael@0: michael@0: // Now we disable the add-on michael@0: Phase("phase05", [ michael@0: [EnsureTracking], michael@0: [Addons.setEnabled, [id], STATE_DISABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase06", [ michael@0: [Addons.verify, [id], STATE_DISABLED], michael@0: ]); michael@0: Phase("phase07", [ michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase08", [ michael@0: [Addons.verify, [id], STATE_DISABLED] michael@0: ]); michael@0: michael@0: // Now we re-enable it again. michael@0: Phase("phase09", [ michael@0: [EnsureTracking], michael@0: [Addons.setEnabled, [id], STATE_ENABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase10", [ michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: ]); michael@0: Phase("phase11", [ michael@0: [Addons.verify, [id], STATE_DISABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase12", [ michael@0: [Addons.verify, [id], STATE_ENABLED] michael@0: ]); michael@0: michael@0: // And we uninstall it michael@0: michael@0: Phase("phase13", [ michael@0: [EnsureTracking], michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Addons.uninstall, [id]], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase14", [ michael@0: [Addons.verifyNot, [id]] michael@0: ]); michael@0: Phase("phase15", [ michael@0: [Addons.verify, [id], STATE_ENABLED], michael@0: [Sync] michael@0: ]); michael@0: Phase("phase16", [ michael@0: [Addons.verifyNot, [id]] michael@0: ]);