test_bug531489.js (1339B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 EnableEngines(["bookmarks"]); 5 6 /* 7 * The list of phases mapped to their corresponding profiles. The object 8 * here must be in JSON format as it will get parsed by the Python 9 * testrunner. It is parsed by the YAML package, so it relatively flexible. 10 */ 11 var phases = { phase1: "profile1", phase2: "profile2", phase3: "profile1" }; 12 13 /* 14 * Bookmark asset lists: these define bookmarks that are used during the test 15 */ 16 17 // the initial list of bookmarks to add to the browser 18 var bookmarks_initial = { 19 menu: [ 20 { folder: "foldera" }, 21 { uri: "http://www.google.com", title: "Google" }, 22 ], 23 "menu/foldera": [{ uri: "http://www.google.com", title: "Google" }], 24 toolbar: [{ uri: "http://www.google.com", title: "Google" }], 25 }; 26 27 /* 28 * Test phases 29 */ 30 31 // Add three bookmarks with the same url to different locations and sync. 32 Phase("phase1", [ 33 [Bookmarks.add, bookmarks_initial], 34 [Bookmarks.verify, bookmarks_initial], 35 [Sync], 36 ]); 37 38 // Sync to profile2 and verify that all three bookmarks are present 39 Phase("phase2", [[Sync], [Bookmarks.verify, bookmarks_initial]]); 40 41 // Sync again to profile1 and verify that all three bookmarks are still 42 // present. 43 Phase("phase3", [[Sync], [Bookmarks.verify, bookmarks_initial]]);