summaryrefslogtreecommitdiffstats
path: root/services/sync/tests/tps
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
commit0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (patch)
treec321601f04cbfd02fb6e12878e745dc49a612c86 /services/sync/tests/tps
parent8860eddcee1417483cafd114f3a9ec127e0f1f74 (diff)
downloadUXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.gz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.lz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.xz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.zip
Import Tycho weave client
Diffstat (limited to 'services/sync/tests/tps')
-rw-r--r--services/sync/tests/tps/addons/api/restartless-xpi@tests.mozilla.org.xml2
-rw-r--r--services/sync/tests/tps/addons/api/unsigned-xpi@tests.mozilla.org.xml2
-rw-r--r--services/sync/tests/tps/all_tests.json2
-rw-r--r--services/sync/tests/tps/test_addon_nonrestartless_xpi.js20
-rw-r--r--services/sync/tests/tps/test_addon_reconciling.js5
-rw-r--r--services/sync/tests/tps/test_addon_restartless_xpi.js2
-rw-r--r--services/sync/tests/tps/test_addon_sanity.js5
-rw-r--r--services/sync/tests/tps/test_addon_wipe.js5
-rw-r--r--services/sync/tests/tps/test_bookmark_conflict.js143
-rw-r--r--services/sync/tests/tps/test_bug530717.js4
-rw-r--r--services/sync/tests/tps/test_bug563989.js3
-rw-r--r--services/sync/tests/tps/test_client_wipe.js4
-rw-r--r--services/sync/tests/tps/test_formdata.js13
-rw-r--r--services/sync/tests/tps/test_prefs.js4
-rw-r--r--services/sync/tests/tps/test_privbrw_formdata.js73
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]
+]);