services/sync/tests/tps/test_bookmarks_in_same_named_folder.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/services/sync/tests/tps/test_bookmarks_in_same_named_folder.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,69 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +// bug 558077
     1.8 +
     1.9 +/*
    1.10 + * The list of phases mapped to their corresponding profiles.  The object
    1.11 + * here must be in strict JSON format, as it will get parsed by the Python
    1.12 + * testrunner (no single quotes, extra comma's, etc).
    1.13 + */
    1.14 +EnableEngines(["bookmarks"]);
    1.15 +
    1.16 +var phases = { "phase1": "profile1",
    1.17 +               "phase2": "profile2",
    1.18 +               "phase3": "profile1"};
    1.19 +
    1.20 +var bookmarks_initial_1 = {
    1.21 +  "menu": [
    1.22 +    { folder: "aaa",
    1.23 +      description: "foo"
    1.24 +    },
    1.25 +    { uri: "http://www.mozilla.com"
    1.26 +    }
    1.27 +  ],
    1.28 +  "menu/aaa": [
    1.29 +    { uri: "http://www.yahoo.com",
    1.30 +      title: "testing Yahoo"
    1.31 +    },
    1.32 +    { uri: "http://www.google.com",
    1.33 +      title: "testing Google"
    1.34 +    }
    1.35 +  ]
    1.36 +};
    1.37 +
    1.38 +var bookmarks_initial_2 = {
    1.39 +  "menu": [
    1.40 +    { folder: "aaa",
    1.41 +      description: "bar"
    1.42 +    },
    1.43 +    { uri: "http://www.mozilla.com"
    1.44 +    }
    1.45 +  ],
    1.46 +  "menu/aaa": [
    1.47 +    { uri: "http://bugzilla.mozilla.org/show_bug.cgi?id=%s",
    1.48 +      title: "Bugzilla"
    1.49 +    },
    1.50 +    { uri: "http://www.apple.com",
    1.51 +      tags: [ "apple" ]
    1.52 +    }
    1.53 +  ]
    1.54 +};
    1.55 +
    1.56 +Phase('phase1', [
    1.57 +  [Bookmarks.add, bookmarks_initial_1],
    1.58 +  [Sync]
    1.59 +]);
    1.60 +
    1.61 +Phase('phase2', [
    1.62 +  [Sync],
    1.63 +  [Bookmarks.verify, bookmarks_initial_1],
    1.64 +  [Bookmarks.add, bookmarks_initial_2],
    1.65 +  [Sync]
    1.66 +]);
    1.67 +
    1.68 +Phase('phase3', [
    1.69 +  [Sync],
    1.70 +  // XXX [Bookmarks.verify, bookmarks_initial_1],
    1.71 +  [Bookmarks.verify, bookmarks_initial_2]
    1.72 +]);

mercurial