1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/services/sync/tests/tps/test_bug556509.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 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(["bookmarks"]); 1.13 + 1.14 +var phases = { "phase1": "profile1", 1.15 + "phase2": "profile2"}; 1.16 + 1.17 + 1.18 +// the initial list of bookmarks to add to the browser 1.19 +var bookmarks_initial = { 1.20 + "menu": [ 1.21 + { folder: "testfolder", 1.22 + description: "it's just me, a test folder" 1.23 + } 1.24 + ], 1.25 + "menu/testfolder": [ 1.26 + { uri: "http://www.mozilla.com", 1.27 + title: "Mozilla" 1.28 + } 1.29 + ] 1.30 +}; 1.31 + 1.32 +/* 1.33 + * Test phases 1.34 + */ 1.35 + 1.36 +// Add a bookmark folder which has a description, and sync. 1.37 +Phase('phase1', [ 1.38 + [Bookmarks.add, bookmarks_initial], 1.39 + [Bookmarks.verify, bookmarks_initial], 1.40 + [Sync] 1.41 +]); 1.42 + 1.43 +// Sync to profile2 and verify that the bookmark folder is created, along 1.44 +// with its description. 1.45 +Phase('phase2', [ 1.46 + [Sync], 1.47 + [Bookmarks.verify, bookmarks_initial] 1.48 +]);