test_existing_bookmarks.js (1747B)
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 = { 12 phase1: "profile1", 13 phase2: "profile2", 14 phase3: "profile2", 15 phase4: "profile1", 16 }; 17 18 /* 19 * Bookmark lists 20 */ 21 var bookmarks_initial = { 22 menu: [ 23 { 24 uri: "http://www.google.com", 25 title: "Google", 26 changes: { 27 title: "google", 28 }, 29 }, 30 { 31 uri: "http://bugzilla.mozilla.org/show_bug.cgi?id=%s", 32 title: "Bugzilla", 33 }, 34 { uri: "http://www.mozilla.com" }, 35 { 36 uri: "http://www.cnn.com", 37 description: "This is a description of the site a at www.cnn.com", 38 changes: { 39 description: "Global news", 40 }, 41 }, 42 ], 43 }; 44 45 var bookmarks_after = { 46 menu: [ 47 { uri: "http://www.google.com", title: "google" }, 48 { 49 uri: "http://bugzilla.mozilla.org/show_bug.cgi?id=%s", 50 title: "Bugzilla", 51 }, 52 { uri: "http://www.mozilla.com" }, 53 { uri: "http://www.cnn.com", description: "Global news" }, 54 ], 55 }; 56 57 /* 58 * Test phases 59 */ 60 61 Phase("phase1", [ 62 [Bookmarks.add, bookmarks_initial], 63 [Bookmarks.verify, bookmarks_initial], 64 [Sync], 65 ]); 66 67 Phase("phase2", [ 68 [Bookmarks.add, bookmarks_initial], 69 [Bookmarks.verify, bookmarks_initial], 70 [Sync], 71 ]); 72 73 Phase("phase3", [ 74 [Bookmarks.verify, bookmarks_initial], 75 [Bookmarks.modify, bookmarks_initial], 76 [Bookmarks.verify, bookmarks_after], 77 [Sync], 78 ]); 79 80 Phase("phase4", [[Sync], [Bookmarks.verify, bookmarks_after]]);