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

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     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"]);
    11 var phases = { "phase1": "profile1",
    12                "phase2": "profile2",
    13                "phase3": "profile1"};
    15 /*
    16  * Bookmark asset lists: these define bookmarks that are used during the test
    17  */
    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 };
    39 /*
    40  * Test phases
    41  */
    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 ]);
    50 // Sync to profile2 and verify that all three bookmarks are present
    51 Phase('phase2', [
    52   [Sync],
    53   [Bookmarks.verify, bookmarks_initial]
    54 ]);
    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 ]);

mercurial