services/sync/tests/tps/test_tabs.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/services/sync/tests/tps/test_tabs.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,59 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 +   http://creativecommons.org/publicdomain/zero/1.0/ */
     1.6 +
     1.7 +/*
     1.8 + * The list of phases mapped to their corresponding profiles.  The object
     1.9 + * here must be in strict JSON format, as it will get parsed by the Python
    1.10 + * testrunner (no single quotes, extra comma's, etc).
    1.11 + */
    1.12 +EnableEngines(["tabs"]);
    1.13 +
    1.14 +var phases = { "phase1": "profile1",
    1.15 +               "phase2": "profile2",
    1.16 +               "phase3": "profile1"};
    1.17 +
    1.18 +/*
    1.19 + * Tab lists.
    1.20 + */
    1.21 +
    1.22 +var tabs1 = [
    1.23 +  { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page1.html",
    1.24 +    title: "Crossweave Test Page 1",
    1.25 +    profile: "profile1"
    1.26 +  },
    1.27 +  { uri: "data:text/html,<html><head><title>Hello</title></head><body>Hello</body></html>",
    1.28 +    title: "Hello",
    1.29 +    profile: "profile1"
    1.30 +  }
    1.31 +];
    1.32 +
    1.33 +var tabs2 = [
    1.34 +  { uri: "http://hg.mozilla.org/automation/crossweave/raw-file/2d9aca9585b6/pages/page3.html",
    1.35 +    title: "Crossweave Test Page 3",
    1.36 +    profile: "profile2"
    1.37 +  },
    1.38 +  { uri: "data:text/html,<html><head><title>Bye</title></head><body>Bye</body></html>",
    1.39 +    profile: "profile2"
    1.40 +  }
    1.41 +];
    1.42 +
    1.43 +/*
    1.44 + * Test phases
    1.45 + */
    1.46 +
    1.47 +Phase('phase1', [
    1.48 +  [Tabs.add, tabs1],
    1.49 +  [Sync]
    1.50 +]);
    1.51 +
    1.52 +Phase('phase2', [
    1.53 +  [Sync],
    1.54 +  [Tabs.verify, tabs1],
    1.55 +  [Tabs.add, tabs2],
    1.56 +  [Sync]
    1.57 +]);
    1.58 +
    1.59 +Phase('phase3', [
    1.60 +  [Sync],
    1.61 +  [Tabs.verify, tabs2]
    1.62 +]);

mercurial