1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/tps/test_bug575423.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,85 @@ 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 + 1.13 +EnableEngines(["history"]); 1.14 + 1.15 +var phases = { "phase1": "profile1", 1.16 + "phase2": "profile2"}; 1.17 + 1.18 +/* 1.19 + * History data 1.20 + */ 1.21 + 1.22 +// the history data to add to the browser 1.23 +var history1 = [ 1.24 + { uri: "http://www.google.com/", 1.25 + title: "Google", 1.26 + visits: [ 1.27 + { type: 1, 1.28 + date: 0 1.29 + }, 1.30 + { type: 2, 1.31 + date: -1 1.32 + } 1.33 + ] 1.34 + }, 1.35 + { uri: "http://www.cnn.com/", 1.36 + title: "CNN", 1.37 + visits: [ 1.38 + { type: 1, 1.39 + date: -1 1.40 + }, 1.41 + { type: 2, 1.42 + date: -36 1.43 + } 1.44 + ] 1.45 + } 1.46 +]; 1.47 + 1.48 +// Another history data to add to the browser 1.49 +var history2 = [ 1.50 + { uri: "http://www.mozilla.com/", 1.51 + title: "Mozilla", 1.52 + visits: [ 1.53 + { type: 1, 1.54 + date: 0 1.55 + }, 1.56 + { type: 2, 1.57 + date: -36 1.58 + } 1.59 + ] 1.60 + }, 1.61 + { uri: "http://www.google.com/language_tools?hl=en", 1.62 + title: "Language Tools", 1.63 + visits: [ 1.64 + { type: 1, 1.65 + date: 0 1.66 + }, 1.67 + { type: 2, 1.68 + date: -40 1.69 + } 1.70 + ] 1.71 + } 1.72 +]; 1.73 + 1.74 +/* 1.75 + * Test phases 1.76 + */ 1.77 +Phase('phase1', [ 1.78 + [History.add, history1], 1.79 + [Sync], 1.80 + [History.add, history2], 1.81 + [Sync] 1.82 +]); 1.83 + 1.84 +Phase('phase2', [ 1.85 + [Sync], 1.86 + [History.verify, history2] 1.87 +]); 1.88 +