services/sync/tests/tps/test_tabs.js

branch
TOR_BUG_3246
changeset 4
fc2d59ddac77
equal deleted inserted replaced
-1:000000000000 0:8fe94750a827
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
15 /*
16 * Tab lists.
17 */
18
19 var tabs1 = [
20 { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html",
21 title: "Crossweave Test Page 1",
22 profile: "profile1"
23 },
24 { uri: "data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>",
25 title: "Hello",
26 profile: "profile1"
27 }
28 ];
29
30 var tabs2 = [
31 { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page3.html",
32 title: "Crossweave Test Page 3",
33 profile: "profile2"
34 },
35 { uri: "data:text/html,<html><head><title>Bye</title></head><body>Bye</body></html>",
36 profile: "profile2"
37 }
38 ];
39
40 /*
41 * Test phases
42 */
43
44 Phase('phase1', [
45 [Tabs.add, tabs1],
46 [Sync]
47 ]);
48
49 Phase('phase2', [
50 [Sync],
51 [Tabs.verify, tabs1],
52 [Tabs.add, tabs2],
53 [Sync]
54 ]);
55
56 Phase('phase3', [
57 [Sync],
58 [Tabs.verify, tabs2]
59 ]);

mercurial