services/sync/tests/tps/test_privbrw_tabs.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(["tabs"]);
    11 var phases = { "phase1": "profile1",
    12                "phase2": "profile2",
    13                "phase3": "profile1",
    14                "phase4": "profile2" };
    16 /*
    17  * Tabs data
    18  */
    20 var tabs1 = [
    21   { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>",
    22     title: "Firefox",
    23     profile: "profile1"
    24   },
    25   { uri: "data:text/html,<html><head><title>Weave</title></head><body>Weave</body></html>",
    26     title: "Weave",
    27     profile: "profile1"
    28   },
    29   { uri: "data:text/html,<html><head><title>Apple</title></head><body>Apple</body></html>",
    30     title: "Apple",
    31     profile: "profile1"
    32   },
    33   { uri: "data:text/html,<html><head><title>IRC</title></head><body>IRC</body></html>",
    34     title: "IRC",
    35     profile: "profile1"
    36   }
    37 ];
    39 var tabs2 = [
    40   { uri: "data:text/html,<html><head><title>Tinderbox</title></head><body>Tinderbox</body></html>",
    41     title: "Tinderbox",
    42     profile: "profile2"
    43   },
    44   { uri: "data:text/html,<html><head><title>Fox</title></head><body>Fox</body></html>",
    45     title: "Fox",
    46     profile: "profile2"
    47   }
    48 ];
    50 var tabs3 = [
    51   { uri: "data:text/html,<html><head><title>Jetpack</title></head><body>Jetpack</body></html>",
    52     title: "Jetpack",
    53     profile: "profile1"
    54   },
    55   { uri: "data:text/html,<html><head><title>Selenium</title></head><body>Selenium</body></html>",
    56     title: "Selenium",
    57     profile: "profile1"
    58   }
    59 ];
    61 /*
    62  * Test phases
    63  */
    65 Phase('phase1', [
    66   [Tabs.add, tabs1],
    67   [Sync]
    68 ]);
    70 Phase('phase2', [
    71   [Sync],
    72   [Tabs.verify, tabs1],
    73   [Tabs.add, tabs2],
    74   [Sync]
    75 ]);
    77 Phase('phase3', [
    78   [Sync],
    79   [Windows.add, { private: true }],
    80   [Tabs.add, tabs3],
    81   [Sync]
    82 ]);
    84 Phase('phase4', [
    85   [Sync],
    86   [Tabs.verifyNot, tabs3]
    87 ]);

mercurial