services/sync/tests/tps/test_bug531489.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 /* Any copyright is dedicated to the Public Domain.
michael@0 2 http://creativecommons.org/publicdomain/zero/1.0/ */
michael@0 3
michael@0 4 /*
michael@0 5 * The list of phases mapped to their corresponding profiles. The object
michael@0 6 * here must be in strict JSON format, as it will get parsed by the Python
michael@0 7 * testrunner (no single quotes, extra comma's, etc).
michael@0 8 */
michael@0 9 EnableEngines(["bookmarks"]);
michael@0 10
michael@0 11 var phases = { "phase1": "profile1",
michael@0 12 "phase2": "profile2",
michael@0 13 "phase3": "profile1"};
michael@0 14
michael@0 15 /*
michael@0 16 * Bookmark asset lists: these define bookmarks that are used during the test
michael@0 17 */
michael@0 18
michael@0 19 // the initial list of bookmarks to add to the browser
michael@0 20 var bookmarks_initial = {
michael@0 21 "menu": [
michael@0 22 { folder: "foldera" },
michael@0 23 { uri: "http://www.google.com",
michael@0 24 title: "Google"
michael@0 25 }
michael@0 26 ],
michael@0 27 "menu/foldera": [
michael@0 28 { uri: "http://www.google.com",
michael@0 29 title: "Google"
michael@0 30 }
michael@0 31 ],
michael@0 32 "toolbar": [
michael@0 33 { uri: "http://www.google.com",
michael@0 34 title: "Google"
michael@0 35 }
michael@0 36 ]
michael@0 37 };
michael@0 38
michael@0 39 /*
michael@0 40 * Test phases
michael@0 41 */
michael@0 42
michael@0 43 // Add three bookmarks with the same url to different locations and sync.
michael@0 44 Phase('phase1', [
michael@0 45 [Bookmarks.add, bookmarks_initial],
michael@0 46 [Bookmarks.verify, bookmarks_initial],
michael@0 47 [Sync]
michael@0 48 ]);
michael@0 49
michael@0 50 // Sync to profile2 and verify that all three bookmarks are present
michael@0 51 Phase('phase2', [
michael@0 52 [Sync],
michael@0 53 [Bookmarks.verify, bookmarks_initial]
michael@0 54 ]);
michael@0 55
michael@0 56 // Sync again to profile1 and verify that all three bookmarks are still
michael@0 57 // present.
michael@0 58 Phase('phase3', [
michael@0 59 [Sync],
michael@0 60 [Bookmarks.verify, bookmarks_initial]
michael@0 61 ]);
michael@0 62

mercurial