test_privbrw_tabs.js (2015B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 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 */ 9 EnableEngines(["tabs"]); 10 11 var phases = { 12 phase1: "profile1", 13 phase2: "profile2", 14 phase3: "profile1", 15 phase4: "profile2", 16 }; 17 18 /* 19 * Tabs data 20 */ 21 22 var tabs1 = [ 23 { 24 uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>", 25 title: "Firefox", 26 profile: "profile1", 27 }, 28 { 29 uri: "data:text/html,<html><head><title>Weave</title></head><body>Weave</body></html>", 30 title: "Weave", 31 profile: "profile1", 32 }, 33 { 34 uri: "data:text/html,<html><head><title>Apple</title></head><body>Apple</body></html>", 35 title: "Apple", 36 profile: "profile1", 37 }, 38 { 39 uri: "data:text/html,<html><head><title>IRC</title></head><body>IRC</body></html>", 40 title: "IRC", 41 profile: "profile1", 42 }, 43 ]; 44 45 var tabs2 = [ 46 { 47 uri: "data:text/html,<html><head><title>Tinderbox</title></head><body>Tinderbox</body></html>", 48 title: "Tinderbox", 49 profile: "profile2", 50 }, 51 { 52 uri: "data:text/html,<html><head><title>Fox</title></head><body>Fox</body></html>", 53 title: "Fox", 54 profile: "profile2", 55 }, 56 ]; 57 58 var tabs3 = [ 59 { 60 uri: "data:text/html,<html><head><title>Jetpack</title></head><body>Jetpack</body></html>", 61 title: "Jetpack", 62 profile: "profile1", 63 }, 64 { 65 uri: "data:text/html,<html><head><title>Selenium</title></head><body>Selenium</body></html>", 66 title: "Selenium", 67 profile: "profile1", 68 }, 69 ]; 70 71 /* 72 * Test phases 73 */ 74 75 Phase("phase1", [[Tabs.add, tabs1], [Sync]]); 76 77 Phase("phase2", [[Sync], [Tabs.verify, tabs1], [Tabs.add, tabs2], [Sync]]); 78 79 Phase("phase3", [ 80 [Sync], 81 [Windows.add, { private: true }], 82 [Tabs.add, tabs3], 83 [Sync], 84 ]); 85 86 Phase("phase4", [[Sync], [Tabs.verifyNot, tabs3]]);