michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /* michael@0: * The list of phases mapped to their corresponding profiles. The object michael@0: * here must be in strict JSON format, as it will get parsed by the Python michael@0: * testrunner (no single quotes, extra comma's, etc). michael@0: */ michael@0: michael@0: EnableEngines(["history"]); michael@0: michael@0: var phases = { "phase1": "profile1", michael@0: "phase2": "profile2"}; michael@0: michael@0: /* michael@0: * History data michael@0: */ michael@0: michael@0: // the history data to add to the browser michael@0: var history1 = [ michael@0: { uri: "http://www.google.com/", michael@0: title: "Google", michael@0: visits: [ michael@0: { type: 1, michael@0: date: 0 michael@0: }, michael@0: { type: 2, michael@0: date: -1 michael@0: } michael@0: ] michael@0: }, michael@0: { uri: "http://www.cnn.com/", michael@0: title: "CNN", michael@0: visits: [ michael@0: { type: 1, michael@0: date: -1 michael@0: }, michael@0: { type: 2, michael@0: date: -36 michael@0: } michael@0: ] michael@0: } michael@0: ]; michael@0: michael@0: // Another history data to add to the browser michael@0: var history2 = [ michael@0: { uri: "http://www.mozilla.com/", michael@0: title: "Mozilla", michael@0: visits: [ michael@0: { type: 1, michael@0: date: 0 michael@0: }, michael@0: { type: 2, michael@0: date: -36 michael@0: } michael@0: ] michael@0: }, michael@0: { uri: "http://www.google.com/language_tools?hl=en", michael@0: title: "Language Tools", michael@0: visits: [ michael@0: { type: 1, michael@0: date: 0 michael@0: }, michael@0: { type: 2, michael@0: date: -40 michael@0: } michael@0: ] michael@0: } michael@0: ]; michael@0: michael@0: /* michael@0: * Test phases michael@0: */ michael@0: Phase('phase1', [ michael@0: [History.add, history1], michael@0: [Sync], michael@0: [History.add, history2], michael@0: [Sync] michael@0: ]); michael@0: michael@0: Phase('phase2', [ michael@0: [Sync], michael@0: [History.verify, history2] michael@0: ]); michael@0: