1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/tps/test_privbrw_tabs.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,87 @@ 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 +EnableEngines(["tabs"]); 1.13 + 1.14 +var phases = { "phase1": "profile1", 1.15 + "phase2": "profile2", 1.16 + "phase3": "profile1", 1.17 + "phase4": "profile2" }; 1.18 + 1.19 +/* 1.20 + * Tabs data 1.21 + */ 1.22 + 1.23 +var tabs1 = [ 1.24 + { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>", 1.25 + title: "Firefox", 1.26 + profile: "profile1" 1.27 + }, 1.28 + { uri: "data:text/html,<html><head><title>Weave</title></head><body>Weave</body></html>", 1.29 + title: "Weave", 1.30 + profile: "profile1" 1.31 + }, 1.32 + { uri: "data:text/html,<html><head><title>Apple</title></head><body>Apple</body></html>", 1.33 + title: "Apple", 1.34 + profile: "profile1" 1.35 + }, 1.36 + { uri: "data:text/html,<html><head><title>IRC</title></head><body>IRC</body></html>", 1.37 + title: "IRC", 1.38 + profile: "profile1" 1.39 + } 1.40 +]; 1.41 + 1.42 +var tabs2 = [ 1.43 + { uri: "data:text/html,<html><head><title>Tinderbox</title></head><body>Tinderbox</body></html>", 1.44 + title: "Tinderbox", 1.45 + profile: "profile2" 1.46 + }, 1.47 + { uri: "data:text/html,<html><head><title>Fox</title></head><body>Fox</body></html>", 1.48 + title: "Fox", 1.49 + profile: "profile2" 1.50 + } 1.51 +]; 1.52 + 1.53 +var tabs3 = [ 1.54 + { uri: "data:text/html,<html><head><title>Jetpack</title></head><body>Jetpack</body></html>", 1.55 + title: "Jetpack", 1.56 + profile: "profile1" 1.57 + }, 1.58 + { uri: "data:text/html,<html><head><title>Selenium</title></head><body>Selenium</body></html>", 1.59 + title: "Selenium", 1.60 + profile: "profile1" 1.61 + } 1.62 +]; 1.63 + 1.64 +/* 1.65 + * Test phases 1.66 + */ 1.67 + 1.68 +Phase('phase1', [ 1.69 + [Tabs.add, tabs1], 1.70 + [Sync] 1.71 +]); 1.72 + 1.73 +Phase('phase2', [ 1.74 + [Sync], 1.75 + [Tabs.verify, tabs1], 1.76 + [Tabs.add, tabs2], 1.77 + [Sync] 1.78 +]); 1.79 + 1.80 +Phase('phase3', [ 1.81 + [Sync], 1.82 + [Windows.add, { private: true }], 1.83 + [Tabs.add, tabs3], 1.84 + [Sync] 1.85 +]); 1.86 + 1.87 +Phase('phase4', [ 1.88 + [Sync], 1.89 + [Tabs.verifyNot, tabs3] 1.90 +]);