diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2018-12-12 11:01:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 11:01:48 +0100 |
commit | bc8a25f5e33700f700b1e07b238bef5dae22f1ad (patch) | |
tree | c1f1ec816f1a85459d05bd6a4cf4f6170b01c602 /services/sync/tests/tps | |
parent | f2d4bd1e395f903355cc157a1de7207e5b22b7fb (diff) | |
parent | 9697bfa68f32984b196748e388d743dddbe6aa7b (diff) | |
download | UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.gz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.lz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.xz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.zip |
Merge pull request #898 from MoonchildProductions/Sync-weave
Remove FxA Phase 1
Diffstat (limited to 'services/sync/tests/tps')
-rw-r--r-- | services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml | 2 | ||||
-rw-r--r-- | services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml | 2 | ||||
-rw-r--r-- | services/sync/tests/tps/all_tests.json | 2 | ||||
-rw-r--r-- | services/sync/tests/tps/test_addon_nonrestartless_xpi.js | 20 | ||||
-rw-r--r-- | services/sync/tests/tps/test_addon_reconciling.js | 5 | ||||
-rw-r--r-- | services/sync/tests/tps/test_addon_restartless_xpi.js | 2 | ||||
-rw-r--r-- | services/sync/tests/tps/test_addon_sanity.js | 5 | ||||
-rw-r--r-- | services/sync/tests/tps/test_addon_wipe.js | 5 | ||||
-rw-r--r-- | services/sync/tests/tps/test_bookmark_conflict.js | 143 | ||||
-rw-r--r-- | services/sync/tests/tps/test_bug530717.js | 4 | ||||
-rw-r--r-- | services/sync/tests/tps/test_bug563989.js | 3 | ||||
-rw-r--r-- | services/sync/tests/tps/test_client_wipe.js | 4 | ||||
-rw-r--r-- | services/sync/tests/tps/test_formdata.js | 13 | ||||
-rw-r--r-- | services/sync/tests/tps/test_prefs.js | 4 | ||||
-rw-r--r-- | services/sync/tests/tps/test_privbrw_formdata.js | 73 |
15 files changed, 95 insertions, 192 deletions
diff --git a/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml b/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml index 6eb153ad1..9a5f6d52b 100644 --- a/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml +++ b/services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml @@ -12,7 +12,7 @@ <application_id>1</application_id> <min_version>3.6</min_version> <max_version>*</max_version> - <appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID> + <appID>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</appID> </application></compatible_applications> <all_compatible_os><os>ALL</os></all_compatible_os> diff --git a/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml b/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml index 14a056013..d7a577b31 100644 --- a/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml +++ b/services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml @@ -12,7 +12,7 @@ <application_id>1</application_id> <min_version>3.6</min_version> <max_version>*</max_version> - <appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID> + <appID>{8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4}</appID> </application></compatible_applications> <all_compatible_os><os>ALL</os></all_compatible_os> diff --git a/services/sync/tests/tps/all_tests.json b/services/sync/tests/tps/all_tests.json index ca7031e59..fdcbe1821 100644 --- a/services/sync/tests/tps/all_tests.json +++ b/services/sync/tests/tps/all_tests.json @@ -1,5 +1,4 @@ { "tests": [ - "test_bookmark_conflict.js", "test_sync.js", "test_prefs.js", "test_tabs.js", @@ -17,6 +16,7 @@ "test_bug575423.js", "test_bug546807.js", "test_history_collision.js", + "test_privbrw_formdata.js", "test_privbrw_passwords.js", "test_privbrw_tabs.js", "test_bookmarks_in_same_named_folder.js", diff --git a/services/sync/tests/tps/test_addon_nonrestartless_xpi.js b/services/sync/tests/tps/test_addon_nonrestartless_xpi.js index b6c85b351..d9a15fc50 100644 --- a/services/sync/tests/tps/test_addon_nonrestartless_xpi.js +++ b/services/sync/tests/tps/test_addon_nonrestartless_xpi.js @@ -6,7 +6,7 @@ // syncs between profiles. EnableEngines(["addons"]); -var phases = { +let phases = { "phase01": "profile1", "phase02": "profile1", "phase03": "profile2", @@ -33,8 +33,7 @@ Phase("phase01", [ [Sync] ]); Phase("phase02", [ - [Addons.verify, [id], STATE_ENABLED], - [Sync] + [Addons.verify, [id], STATE_ENABLED] ]); Phase("phase03", [ [Addons.verifyNot, [id]], @@ -42,7 +41,6 @@ Phase("phase03", [ ]); Phase("phase04", [ [Addons.verify, [id], STATE_ENABLED], - [Sync] ]); // Now we disable the add-on @@ -53,15 +51,13 @@ Phase("phase05", [ ]); Phase("phase06", [ [Addons.verify, [id], STATE_DISABLED], - [Sync] ]); Phase("phase07", [ [Addons.verify, [id], STATE_ENABLED], [Sync] ]); Phase("phase08", [ - [Addons.verify, [id], STATE_DISABLED], - [Sync] + [Addons.verify, [id], STATE_DISABLED] ]); // Now we re-enable it again. @@ -72,15 +68,13 @@ Phase("phase09", [ ]); Phase("phase10", [ [Addons.verify, [id], STATE_ENABLED], - [Sync] ]); Phase("phase11", [ [Addons.verify, [id], STATE_DISABLED], [Sync] ]); Phase("phase12", [ - [Addons.verify, [id], STATE_ENABLED], - [Sync] + [Addons.verify, [id], STATE_ENABLED] ]); // And we uninstall it @@ -92,14 +86,12 @@ Phase("phase13", [ [Sync] ]); Phase("phase14", [ - [Addons.verifyNot, [id]], - [Sync] + [Addons.verifyNot, [id]] ]); Phase("phase15", [ [Addons.verify, [id], STATE_ENABLED], [Sync] ]); Phase("phase16", [ - [Addons.verifyNot, [id]], - [Sync] + [Addons.verifyNot, [id]] ]); diff --git a/services/sync/tests/tps/test_addon_reconciling.js b/services/sync/tests/tps/test_addon_reconciling.js index a4244ab03..14dda8ade 100644 --- a/services/sync/tests/tps/test_addon_reconciling.js +++ b/services/sync/tests/tps/test_addon_reconciling.js @@ -6,7 +6,7 @@ // the proper action is taken. EnableEngines(["addons"]); -var phases = { +let phases = { "phase01": "profile1", "phase02": "profile2", "phase03": "profile1", @@ -34,9 +34,6 @@ Phase("phase02", [ Phase("phase03", [ [Sync], // Get GUID updates, potentially. [Addons.setEnabled, [id], STATE_DISABLED], - // We've changed the state, but don't want this profile to sync until phase5, - // so if we ran a validation now we'd be expecting to find errors. - [Addons.skipValidation] ]); Phase("phase04", [ [EnsureTracking], diff --git a/services/sync/tests/tps/test_addon_restartless_xpi.js b/services/sync/tests/tps/test_addon_restartless_xpi.js index b242c95f0..7d45406bd 100644 --- a/services/sync/tests/tps/test_addon_restartless_xpi.js +++ b/services/sync/tests/tps/test_addon_restartless_xpi.js @@ -5,7 +5,7 @@ // other profiles. EnableEngines(["addons"]); -var phases = { +let phases = { "phase01": "profile1", "phase02": "profile2", "phase03": "profile1", diff --git a/services/sync/tests/tps/test_addon_sanity.js b/services/sync/tests/tps/test_addon_sanity.js index 240918094..0d738eb67 100644 --- a/services/sync/tests/tps/test_addon_sanity.js +++ b/services/sync/tests/tps/test_addon_sanity.js @@ -9,7 +9,7 @@ EnableEngines(["addons"]); -var phases = { "phase1": "profile1", +let phases = { "phase1": "profile1", "phase2": "profile1" }; const id = "unsigned-xpi@tests.mozilla.org"; @@ -25,6 +25,5 @@ Phase("phase1", [ Phase("phase2", [ // Add-on should be present after restart - [Addons.verify, [id], STATE_ENABLED], - [Sync] // Sync to ensure everything is initialized enough for the addon validator to run + [Addons.verify, [id], STATE_ENABLED] ]); diff --git a/services/sync/tests/tps/test_addon_wipe.js b/services/sync/tests/tps/test_addon_wipe.js index 60131abc0..2aafbd6bf 100644 --- a/services/sync/tests/tps/test_addon_wipe.js +++ b/services/sync/tests/tps/test_addon_wipe.js @@ -8,7 +8,7 @@ EnableEngines(["addons"]); -var phases = { +let phases = { "phase01": "profile1", "phase02": "profile1", "phase03": "profile1" @@ -30,6 +30,5 @@ Phase("phase02", [ ]); Phase("phase03", [ [Addons.verify, [id1], STATE_ENABLED], - [Addons.verify, [id2], STATE_ENABLED], - [Sync] // Sync to ensure that the addon validator can run without error + [Addons.verify, [id2], STATE_ENABLED] ]); diff --git a/services/sync/tests/tps/test_bookmark_conflict.js b/services/sync/tests/tps/test_bookmark_conflict.js deleted file mode 100644 index cfe9d782e..000000000 --- a/services/sync/tests/tps/test_bookmark_conflict.js +++ /dev/null @@ -1,143 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -/* - * The list of phases mapped to their corresponding profiles. The object - * here must be in strict JSON format, as it will get parsed by the Python - * testrunner (no single quotes, extra comma's, etc). - */ -EnableEngines(["bookmarks"]); - -var phases = { "phase1": "profile1", - "phase2": "profile2", - "phase3": "profile1", - "phase4": "profile2" }; - - -// the initial list of bookmarks to add to the browser -var bookmarksInitial = { - "menu": [ - { folder: "foldera" }, - { folder: "folderb" }, - { folder: "folderc" }, - { folder: "folderd" }, - ], - - "menu/foldera": [{ uri: "http://www.cnn.com", title: "CNN" }], - "menu/folderb": [{ uri: "http://www.apple.com", title: "Apple", tags: [] }], - "menu/folderc": [{ uri: "http://www.yahoo.com", title: "Yahoo" }], - - "menu/folderd": [] -}; - -// a list of bookmarks to delete during a 'delete' action on P2 -var bookmarksToDelete = { - "menu": [ - { folder: "foldera" }, - { folder: "folderb" }, - ], - "menu/folderc": [{ uri: "http://www.yahoo.com", title: "Yahoo" }], -}; - - -// the modifications to make on P1, after P2 has synced, but before P1 has gotten -// P2's changes -var bookmarkMods = { - "menu": [ - { folder: "foldera" }, - { folder: "folderb" }, - { folder: "folderc" }, - { folder: "folderd" }, - ], - - // we move this child out of its folder (p1), after deleting the folder (p2) - // and expect the child to come back to p2 after sync. - "menu/foldera": [{ - uri: "http://www.cnn.com", - title: "CNN", - changes: { location: "menu/folderd" } - }], - - // we rename this child (p1) after deleting the folder (p2), and expect the child - // to be moved into great grandparent (menu) - "menu/folderb": [{ - uri: "http://www.apple.com", - title: "Apple", - tags: [], - changes: { title: "Mac" } - }], - - - // we move this child (p1) after deleting the child (p2) and expect it to survive - "menu/folderc": [{ - uri: "http://www.yahoo.com", - title: "Yahoo", - changes: { location: "menu/folderd" } - }], - - "menu/folderd": [] -}; - -// a list of bookmarks to delete during a 'delete' action -var bookmarksToDelete = { - "menu": [ - { folder: "foldera" }, - { folder: "folderb" }, - ], - "menu/folderc": [ - { uri: "http://www.yahoo.com", title: "Yahoo" }, - ], -}; - - - -// expected bookmark state after conflict resolution -var bookmarksExpected = { - "menu": [ - { folder: "folderc" }, - { folder: "folderd" }, - { uri: "http://www.apple.com", title: "Mac", }, - ], - - "menu/folderc": [], - - "menu/folderd": [ - { uri: "http://www.cnn.com", title: "CNN" }, - { uri: "http://www.yahoo.com", title: "Yahoo" } - ] -}; - -// Add bookmarks to profile1 and sync. -Phase("phase1", [ - [Bookmarks.add, bookmarksInitial], - [Bookmarks.verify, bookmarksInitial], - [Sync], - [Bookmarks.verify, bookmarksInitial], -]); - -// Sync to profile2 and verify that the bookmarks are present. Delete -// bookmarks/folders, verify that it's not present, and sync -Phase("phase2", [ - [Sync], - [Bookmarks.verify, bookmarksInitial], - [Bookmarks.delete, bookmarksToDelete], - [Bookmarks.verifyNot, bookmarksToDelete], - [Sync] -]); - -// Using profile1, modify the bookmarks, and sync *after* the modification, -// and then sync again to propagate the reconciliation changes. -Phase("phase3", [ - [Bookmarks.verify, bookmarksInitial], - [Bookmarks.modify, bookmarkMods], - [Sync], - [Bookmarks.verify, bookmarksExpected], - [Bookmarks.verifyNot, bookmarksToDelete], -]); - -// Back in profile2, do a sync and verify that we're in the expected state -Phase("phase4", [ - [Sync], - [Bookmarks.verify, bookmarksExpected], - [Bookmarks.verifyNot, bookmarksToDelete], -]); diff --git a/services/sync/tests/tps/test_bug530717.js b/services/sync/tests/tps/test_bug530717.js index 4a11b0a27..1252b382f 100644 --- a/services/sync/tests/tps/test_bug530717.js +++ b/services/sync/tests/tps/test_bug530717.js @@ -23,7 +23,7 @@ var prefs1 = [ { name: "browser.urlbar.maxRichResults", value: 20 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: true } ]; @@ -35,7 +35,7 @@ var prefs2 = [ { name: "browser.urlbar.maxRichResults", value: 18 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: false } ]; diff --git a/services/sync/tests/tps/test_bug563989.js b/services/sync/tests/tps/test_bug563989.js index faf63de65..ec890a1a2 100644 --- a/services/sync/tests/tps/test_bug563989.js +++ b/services/sync/tests/tps/test_bug563989.js @@ -88,8 +88,7 @@ Phase('phase2', [ [Sync], [Bookmarks.verify, bookmarks_initial], [Bookmarks.delete, bookmarks_to_delete], - [Bookmarks.verifyNot, bookmarks_to_delete], - [Bookmarks.skipValidation] + [Bookmarks.verifyNot, bookmarks_to_delete] ]); // Using profile1, sync again with wipe-server set to true. Verify our diff --git a/services/sync/tests/tps/test_client_wipe.js b/services/sync/tests/tps/test_client_wipe.js index ba9815db5..049b385fe 100644 --- a/services/sync/tests/tps/test_client_wipe.js +++ b/services/sync/tests/tps/test_client_wipe.js @@ -108,7 +108,7 @@ var prefs1 = [ { name: "browser.urlbar.maxRichResults", value: 20 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: true } ]; @@ -120,7 +120,7 @@ var prefs2 = [ { name: "browser.urlbar.maxRichResults", value: 18 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: false } ]; diff --git a/services/sync/tests/tps/test_formdata.js b/services/sync/tests/tps/test_formdata.js index decb58dd8..2c93f6592 100644 --- a/services/sync/tests/tps/test_formdata.js +++ b/services/sync/tests/tps/test_formdata.js @@ -31,11 +31,6 @@ var formdata1 = [ } ]; -// This is currently pointless - it *looks* like it is trying to check that -// one of the entries in formdata1 has been removed, but (a) the delete code -// isn't active (see comments below), and (b) the way the verification works -// means it would never do the right thing - it only checks all the entries -// here exist, but not that they are the only entries in the DB. var formdata2 = [ { fieldname: "testing", value: "success", @@ -52,11 +47,6 @@ var formdata_delete = [ } ]; -var formdata_new = [ - { fieldname: "new-field", - value: "new-value" - } -] /* * Test phases */ @@ -82,15 +72,12 @@ Phase('phase3', [ [Formdata.delete, formdata_delete], //[Formdata.verifyNot, formdata_delete], [Formdata.verify, formdata2], - // add new data after the first Sync, ensuring the tracker works. - [Formdata.add, formdata_new], [Sync], ]); Phase('phase4', [ [Sync], [Formdata.verify, formdata2], - [Formdata.verify, formdata_new], //[Formdata.verifyNot, formdata_delete] ]); diff --git a/services/sync/tests/tps/test_prefs.js b/services/sync/tests/tps/test_prefs.js index 3afff130d..48ffe80e5 100644 --- a/services/sync/tests/tps/test_prefs.js +++ b/services/sync/tests/tps/test_prefs.js @@ -19,7 +19,7 @@ var prefs1 = [ { name: "browser.urlbar.maxRichResults", value: 20 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: true } ]; @@ -31,7 +31,7 @@ var prefs2 = [ { name: "browser.urlbar.maxRichResults", value: 18 }, - { name: "privacy.clearOnShutdown.siteSettings", + { name: "security.OCSP.require", value: false } ]; diff --git a/services/sync/tests/tps/test_privbrw_formdata.js b/services/sync/tests/tps/test_privbrw_formdata.js new file mode 100644 index 000000000..e1661611e --- /dev/null +++ b/services/sync/tests/tps/test_privbrw_formdata.js @@ -0,0 +1,73 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +/* + * The list of phases mapped to their corresponding profiles. The object + * here must be in strict JSON format, as it will get parsed by the Python + * testrunner (no single quotes, extra comma's, etc). + */ +EnableEngines(["forms"]); + +var phases = { "phase1": "profile1", + "phase2": "profile2", + "phase3": "profile1", + "phase4": "profile2" }; + +/* + * Form data + */ + +// the form data to add to the browser +var formdata1 = [ + { fieldname: "name", + value: "xyz", + date: -1 + }, + { fieldname: "email", + value: "abc@gmail.com", + date: -2 + }, + { fieldname: "username", + value: "joe" + } +]; + +// the form data to add in private browsing mode +var formdata2 = [ + { fieldname: "password", + value: "secret", + date: -1 + }, + { fieldname: "city", + value: "mtview" + } +]; + +/* + * Test phases + */ + +Phase('phase1', [ + [Formdata.add, formdata1], + [Formdata.verify, formdata1], + [Sync] +]); + +Phase('phase2', [ + [Sync], + [Formdata.verify, formdata1] +]); + +Phase('phase3', [ + [Sync], + [Windows.add, { private: true }], + [Formdata.add, formdata2], + [Formdata.verify, formdata2], + [Sync], +]); + +Phase('phase4', [ + [Sync], + [Formdata.verify, formdata1], + [Formdata.verifyNot, formdata2] +]); |