|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 /* |
|
5 * The list of phases mapped to their corresponding profiles. The object |
|
6 * here must be in strict JSON format, as it will get parsed by the Python |
|
7 * testrunner (no single quotes, extra comma's, etc). |
|
8 */ |
|
9 EnableEngines(["tabs"]); |
|
10 |
|
11 var phases = { "phase1": "profile1", |
|
12 "phase2": "profile2", |
|
13 "phase3": "profile1", |
|
14 "phase4": "profile2" }; |
|
15 |
|
16 /* |
|
17 * Tabs data |
|
18 */ |
|
19 |
|
20 var tabs1 = [ |
|
21 { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>", |
|
22 title: "Firefox", |
|
23 profile: "profile1" |
|
24 }, |
|
25 { uri: "data:text/html,<html><head><title>Weave</title></head><body>Weave</body></html>", |
|
26 title: "Weave", |
|
27 profile: "profile1" |
|
28 }, |
|
29 { uri: "data:text/html,<html><head><title>Apple</title></head><body>Apple</body></html>", |
|
30 title: "Apple", |
|
31 profile: "profile1" |
|
32 }, |
|
33 { uri: "data:text/html,<html><head><title>IRC</title></head><body>IRC</body></html>", |
|
34 title: "IRC", |
|
35 profile: "profile1" |
|
36 } |
|
37 ]; |
|
38 |
|
39 var tabs2 = [ |
|
40 { uri: "data:text/html,<html><head><title>Tinderbox</title></head><body>Tinderbox</body></html>", |
|
41 title: "Tinderbox", |
|
42 profile: "profile2" |
|
43 }, |
|
44 { uri: "data:text/html,<html><head><title>Fox</title></head><body>Fox</body></html>", |
|
45 title: "Fox", |
|
46 profile: "profile2" |
|
47 } |
|
48 ]; |
|
49 |
|
50 var tabs3 = [ |
|
51 { uri: "data:text/html,<html><head><title>Jetpack</title></head><body>Jetpack</body></html>", |
|
52 title: "Jetpack", |
|
53 profile: "profile1" |
|
54 }, |
|
55 { uri: "data:text/html,<html><head><title>Selenium</title></head><body>Selenium</body></html>", |
|
56 title: "Selenium", |
|
57 profile: "profile1" |
|
58 } |
|
59 ]; |
|
60 |
|
61 /* |
|
62 * Test phases |
|
63 */ |
|
64 |
|
65 Phase('phase1', [ |
|
66 [Tabs.add, tabs1], |
|
67 [Sync] |
|
68 ]); |
|
69 |
|
70 Phase('phase2', [ |
|
71 [Sync], |
|
72 [Tabs.verify, tabs1], |
|
73 [Tabs.add, tabs2], |
|
74 [Sync] |
|
75 ]); |
|
76 |
|
77 Phase('phase3', [ |
|
78 [Sync], |
|
79 [Windows.add, { private: true }], |
|
80 [Tabs.add, tabs3], |
|
81 [Sync] |
|
82 ]); |
|
83 |
|
84 Phase('phase4', [ |
|
85 [Sync], |
|
86 [Tabs.verifyNot, tabs3] |
|
87 ]); |