services/sync/tests/tps/test_special_tabs.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 // Bug 532173 - Dont sync tabs like about:* , weave firstrun etc
     6 /*
     7  * The list of phases mapped to their corresponding profiles.  The object
     8  * here must be in strict JSON format, as it will get parsed by the Python
     9  * testrunner (no single quotes, extra comma's, etc).
    10  */
    11 EnableEngines(["tabs"]);
    13 var phases = { "phase1": "profile1",
    14                "phase2": "profile2" };
    16 var tabs1 = [
    17   { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>",
    18     title: "Firefox",
    19     profile: "profile1"
    20   },
    21   { uri: "about:plugins",
    22     title: "About",
    23     profile: "profile1"
    24   },
    25   { uri: "about:credits",
    26     title: "Credits",
    27     profile: "profile1"
    28   },
    29   { uri: "data:text/html,<html><head><title>Mozilla</title></head><body>Mozilla</body></html>",
    30     title: "Mozilla",
    31     profile: "profile1"
    32   },
    33   { uri: "http://www.mozilla.com/en-US/firefox/sync/firstrun.html",
    34     title: "Firstrun",
    35     profile: "profile1"
    36   }
    37 ];
    39 var tabs2 = [
    40   { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>",
    41     title: "Firefox",
    42     profile: "profile1"
    43   },
    44   { uri: "data:text/html,<html><head><title>Mozilla</title></head><body>Mozilla</body></html>",
    45     title: "Mozilla",
    46     profile: "profile1"
    47   }
    48 ];
    50 var tabs3 = [
    51   { uri: "http://www.mozilla.com/en-US/firefox/sync/firstrun.html",
    52     title: "Firstrun",
    53     profile: "profile1"
    54   },
    55   { uri: "about:plugins",
    56     title: "About",
    57     profile: "profile1"
    58   },
    59   { uri: "about:credits",
    60     title: "Credits",
    61     profile: "profile1"
    62   }
    63 ];
    65 /*
    66  * Test phases
    67  */
    68 Phase('phase1', [
    69   [Tabs.add, tabs1],
    70   [Sync]
    71 ]);
    73 Phase('phase2', [
    74   [Sync],
    75   [Tabs.verify, tabs2],
    76   [Tabs.verifyNot, tabs3]
    77 ]);

mercurial