|
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(["bookmarks"]); |
|
10 |
|
11 var phases = { "phase1": "profile1", |
|
12 "phase2": "profile2", |
|
13 "phase3": "profile1"}; |
|
14 |
|
15 /* |
|
16 * Bookmark asset lists: these define bookmarks that are used during the test |
|
17 */ |
|
18 |
|
19 // the initial list of bookmarks to add to the browser |
|
20 var bookmarks_initial = { |
|
21 "menu": [ |
|
22 { folder: "foldera" }, |
|
23 { uri: "http://www.google.com", |
|
24 title: "Google" |
|
25 } |
|
26 ], |
|
27 "menu/foldera": [ |
|
28 { uri: "http://www.google.com", |
|
29 title: "Google" |
|
30 } |
|
31 ], |
|
32 "toolbar": [ |
|
33 { uri: "http://www.google.com", |
|
34 title: "Google" |
|
35 } |
|
36 ] |
|
37 }; |
|
38 |
|
39 /* |
|
40 * Test phases |
|
41 */ |
|
42 |
|
43 // Add three bookmarks with the same url to different locations and sync. |
|
44 Phase('phase1', [ |
|
45 [Bookmarks.add, bookmarks_initial], |
|
46 [Bookmarks.verify, bookmarks_initial], |
|
47 [Sync] |
|
48 ]); |
|
49 |
|
50 // Sync to profile2 and verify that all three bookmarks are present |
|
51 Phase('phase2', [ |
|
52 [Sync], |
|
53 [Bookmarks.verify, bookmarks_initial] |
|
54 ]); |
|
55 |
|
56 // Sync again to profile1 and verify that all three bookmarks are still |
|
57 // present. |
|
58 Phase('phase3', [ |
|
59 [Sync], |
|
60 [Bookmarks.verify, bookmarks_initial] |
|
61 ]); |
|
62 |