1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/tps/test_special_tabs.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,78 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +// Bug 532173 - Dont sync tabs like about:* , weave firstrun etc 1.8 + 1.9 +/* 1.10 + * The list of phases mapped to their corresponding profiles. The object 1.11 + * here must be in strict JSON format, as it will get parsed by the Python 1.12 + * testrunner (no single quotes, extra comma's, etc). 1.13 + */ 1.14 +EnableEngines(["tabs"]); 1.15 + 1.16 +var phases = { "phase1": "profile1", 1.17 + "phase2": "profile2" }; 1.18 + 1.19 +var tabs1 = [ 1.20 + { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>", 1.21 + title: "Firefox", 1.22 + profile: "profile1" 1.23 + }, 1.24 + { uri: "about:plugins", 1.25 + title: "About", 1.26 + profile: "profile1" 1.27 + }, 1.28 + { uri: "about:credits", 1.29 + title: "Credits", 1.30 + profile: "profile1" 1.31 + }, 1.32 + { uri: "data:text/html,<html><head><title>Mozilla</title></head><body>Mozilla</body></html>", 1.33 + title: "Mozilla", 1.34 + profile: "profile1" 1.35 + }, 1.36 + { uri: "http://www.mozilla.com/en-US/firefox/sync/firstrun.html", 1.37 + title: "Firstrun", 1.38 + profile: "profile1" 1.39 + } 1.40 +]; 1.41 + 1.42 +var tabs2 = [ 1.43 + { uri: "data:text/html,<html><head><title>Firefox</title></head><body>Firefox</body></html>", 1.44 + title: "Firefox", 1.45 + profile: "profile1" 1.46 + }, 1.47 + { uri: "data:text/html,<html><head><title>Mozilla</title></head><body>Mozilla</body></html>", 1.48 + title: "Mozilla", 1.49 + profile: "profile1" 1.50 + } 1.51 +]; 1.52 + 1.53 +var tabs3 = [ 1.54 + { uri: "http://www.mozilla.com/en-US/firefox/sync/firstrun.html", 1.55 + title: "Firstrun", 1.56 + profile: "profile1" 1.57 + }, 1.58 + { uri: "about:plugins", 1.59 + title: "About", 1.60 + profile: "profile1" 1.61 + }, 1.62 + { uri: "about:credits", 1.63 + title: "Credits", 1.64 + profile: "profile1" 1.65 + } 1.66 +]; 1.67 + 1.68 +/* 1.69 + * Test phases 1.70 + */ 1.71 +Phase('phase1', [ 1.72 + [Tabs.add, tabs1], 1.73 + [Sync] 1.74 +]); 1.75 + 1.76 +Phase('phase2', [ 1.77 + [Sync], 1.78 + [Tabs.verify, tabs2], 1.79 + [Tabs.verifyNot, tabs3] 1.80 +]); 1.81 +