test_bug575423.js (1348B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 EnableEngines(["history"]); 5 6 /* 7 * The list of phases mapped to their corresponding profiles. The object 8 * here must be in JSON format as it will get parsed by the Python 9 * testrunner. It is parsed by the YAML package, so it relatively flexible. 10 */ 11 var phases = { phase1: "profile1", phase2: "profile2" }; 12 13 /* 14 * History data 15 */ 16 17 // the history data to add to the browser 18 var history1 = [ 19 { 20 uri: "http://www.google.com/", 21 title: "Google", 22 visits: [ 23 { type: 1, date: 0 }, 24 { type: 2, date: -1 }, 25 ], 26 }, 27 { 28 uri: "http://www.cnn.com/", 29 title: "CNN", 30 visits: [ 31 { type: 1, date: -1 }, 32 { type: 2, date: -36 }, 33 ], 34 }, 35 ]; 36 37 // Another history data to add to the browser 38 var history2 = [ 39 { 40 uri: "http://www.mozilla.com/", 41 title: "Mozilla", 42 visits: [ 43 { type: 1, date: 0 }, 44 { type: 2, date: -36 }, 45 ], 46 }, 47 { 48 uri: "http://www.google.com/language_tools?hl=en", 49 title: "Language Tools", 50 visits: [ 51 { type: 1, date: 0 }, 52 { type: 2, date: -40 }, 53 ], 54 }, 55 ]; 56 57 /* 58 * Test phases 59 */ 60 Phase("phase1", [ 61 [History.add, history1], 62 [Sync], 63 [History.add, history2], 64 [Sync], 65 ]); 66 67 Phase("phase2", [[Sync], [History.verify, history2]]);