services/sync/tests/tps/test_bug575423.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  */
    10 EnableEngines(["history"]);
    12 var phases = { "phase1": "profile1",
    13                "phase2": "profile2"};
    15 /*
    16  * History data
    17  */
    19 // the history data to add to the browser
    20 var history1 = [
    21   { uri: "http://www.google.com/",
    22     title: "Google",
    23     visits: [
    24       { type: 1,
    25         date: 0
    26       },
    27       { type: 2,
    28         date: -1
    29       }
    30     ]
    31   },
    32   { uri: "http://www.cnn.com/",
    33     title: "CNN",
    34     visits: [
    35       { type: 1,
    36         date: -1
    37       },
    38       { type: 2,
    39         date: -36
    40       }
    41     ]
    42   }
    43 ];
    45 // Another history data to add to the browser
    46 var history2 = [
    47   { uri: "http://www.mozilla.com/",
    48     title: "Mozilla",
    49     visits: [
    50       { type: 1,
    51         date: 0
    52       },
    53       { type: 2,
    54         date: -36
    55       }
    56     ]
    57   },
    58   { uri: "http://www.google.com/language_tools?hl=en",
    59     title: "Language Tools",
    60     visits: [
    61       { type: 1, 
    62         date: 0
    63       },
    64       { type: 2, 
    65         date: -40
    66       }
    67     ]
    68   }
    69 ];
    71 /*
    72  * Test phases
    73  */
    74 Phase('phase1', [
    75   [History.add, history1],
    76   [Sync],
    77   [History.add, history2],
    78   [Sync]
    79 ]);
    81 Phase('phase2', [
    82   [Sync],
    83   [History.verify, history2]
    84 ]);

mercurial