|
1 |
|
2 /* Any copyright is dedicated to the Public Domain. |
|
3 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
4 |
|
5 // This test verifies that install of extensions that require restart |
|
6 // syncs between profiles. |
|
7 EnableEngines(["addons"]); |
|
8 |
|
9 let phases = { |
|
10 "phase01": "profile1", |
|
11 "phase02": "profile1", |
|
12 "phase03": "profile2", |
|
13 "phase04": "profile2", |
|
14 "phase05": "profile1", |
|
15 "phase06": "profile1", |
|
16 "phase07": "profile2", |
|
17 "phase08": "profile2", |
|
18 "phase09": "profile1", |
|
19 "phase10": "profile1", |
|
20 "phase11": "profile2", |
|
21 "phase12": "profile2", |
|
22 "phase13": "profile1", |
|
23 "phase14": "profile1", |
|
24 "phase15": "profile2", |
|
25 "phase16": "profile2" |
|
26 }; |
|
27 |
|
28 const id = "unsigned-xpi@tests.mozilla.org"; |
|
29 |
|
30 Phase("phase01", [ |
|
31 [Addons.verifyNot, [id]], |
|
32 [Addons.install, [id]], |
|
33 [Sync] |
|
34 ]); |
|
35 Phase("phase02", [ |
|
36 [Addons.verify, [id], STATE_ENABLED] |
|
37 ]); |
|
38 Phase("phase03", [ |
|
39 [Addons.verifyNot, [id]], |
|
40 [Sync] |
|
41 ]); |
|
42 Phase("phase04", [ |
|
43 [Addons.verify, [id], STATE_ENABLED], |
|
44 ]); |
|
45 |
|
46 // Now we disable the add-on |
|
47 Phase("phase05", [ |
|
48 [EnsureTracking], |
|
49 [Addons.setEnabled, [id], STATE_DISABLED], |
|
50 [Sync] |
|
51 ]); |
|
52 Phase("phase06", [ |
|
53 [Addons.verify, [id], STATE_DISABLED], |
|
54 ]); |
|
55 Phase("phase07", [ |
|
56 [Addons.verify, [id], STATE_ENABLED], |
|
57 [Sync] |
|
58 ]); |
|
59 Phase("phase08", [ |
|
60 [Addons.verify, [id], STATE_DISABLED] |
|
61 ]); |
|
62 |
|
63 // Now we re-enable it again. |
|
64 Phase("phase09", [ |
|
65 [EnsureTracking], |
|
66 [Addons.setEnabled, [id], STATE_ENABLED], |
|
67 [Sync] |
|
68 ]); |
|
69 Phase("phase10", [ |
|
70 [Addons.verify, [id], STATE_ENABLED], |
|
71 ]); |
|
72 Phase("phase11", [ |
|
73 [Addons.verify, [id], STATE_DISABLED], |
|
74 [Sync] |
|
75 ]); |
|
76 Phase("phase12", [ |
|
77 [Addons.verify, [id], STATE_ENABLED] |
|
78 ]); |
|
79 |
|
80 // And we uninstall it |
|
81 |
|
82 Phase("phase13", [ |
|
83 [EnsureTracking], |
|
84 [Addons.verify, [id], STATE_ENABLED], |
|
85 [Addons.uninstall, [id]], |
|
86 [Sync] |
|
87 ]); |
|
88 Phase("phase14", [ |
|
89 [Addons.verifyNot, [id]] |
|
90 ]); |
|
91 Phase("phase15", [ |
|
92 [Addons.verify, [id], STATE_ENABLED], |
|
93 [Sync] |
|
94 ]); |
|
95 Phase("phase16", [ |
|
96 [Addons.verifyNot, [id]] |
|
97 ]); |