mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 704642 - Add files missing from previous commit; a=bustage
This commit is contained in:
parent
61cb6a8c7f
commit
7a3161d886
27
services/sync/tests/tps/restartless-xpi.xml
Normal file
27
services/sync/tests/tps/restartless-xpi.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<searchresults total_results="1">
|
||||
<addon id="5617">
|
||||
<name>Restartless Test XPI</name>
|
||||
<type id="1">Extension</type>
|
||||
<guid>restartless-xpi@tests.mozilla.org</guid>
|
||||
<slug>restartless-xpi</slug>
|
||||
<version>1.0</version>
|
||||
|
||||
<compatible_applications><application>
|
||||
<name>Firefox</name>
|
||||
<application_id>1</application_id>
|
||||
<min_version>3.6</min_version>
|
||||
<max_version>*</max_version>
|
||||
<appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
|
||||
</application></compatible_applications>
|
||||
<all_compatible_os><os>ALL</os></all_compatible_os>
|
||||
|
||||
<install os="ALL" size="485">http://127.0.0.1:4567/restartless.xpi</install>
|
||||
<created epoch="1252903662">
|
||||
2009-09-14T04:47:42Z
|
||||
</created>
|
||||
<last_updated epoch="1315255329">
|
||||
2011-09-05T20:42:09Z
|
||||
</last_updated>
|
||||
</addon>
|
||||
</searchresults>
|
94
services/sync/tests/tps/test_addon_nonrestartless_xpi.js
Normal file
94
services/sync/tests/tps/test_addon_nonrestartless_xpi.js
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// This test verifies that install of extensions that require restart
|
||||
// syncs between profiles.
|
||||
EnableEngines(["addons"]);
|
||||
|
||||
let phases = {
|
||||
"phase01": "profile1",
|
||||
"phase02": "profile1",
|
||||
"phase03": "profile2",
|
||||
"phase04": "profile2",
|
||||
"phase05": "profile1",
|
||||
"phase06": "profile1",
|
||||
"phase07": "profile2",
|
||||
"phase08": "profile2",
|
||||
"phase09": "profile1",
|
||||
"phase10": "profile1",
|
||||
"phase11": "profile2",
|
||||
"phase12": "profile2",
|
||||
"phase13": "profile1",
|
||||
"phase14": "profile1",
|
||||
"phase15": "profile2",
|
||||
"phase16": "profile2"
|
||||
};
|
||||
|
||||
const id = "unsigned-xpi@tests.mozilla.org";
|
||||
|
||||
Phase("phase01", [
|
||||
[Addons.verifyNot, [id]],
|
||||
[Addons.install, [id]],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase02", [
|
||||
[Addons.verify, [id], STATE_ENABLED]
|
||||
]);
|
||||
Phase("phase03", [
|
||||
[Addons.verifyNot, [id]],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase04", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
]);
|
||||
|
||||
// Now we disable the add-on
|
||||
Phase("phase05", [
|
||||
[Sync],
|
||||
[Addons.setEnabled, [id], STATE_DISABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase06", [
|
||||
[Addons.verify, [id], STATE_DISABLED],
|
||||
]);
|
||||
Phase("phase07", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase08", [
|
||||
[Addons.verify, [id], STATE_DISABLED]
|
||||
]);
|
||||
|
||||
// Now we re-enable it again.
|
||||
Phase("phase09", [
|
||||
[Addons.setEnabled, [id], STATE_ENABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase10", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
]);
|
||||
Phase("phase11", [
|
||||
[Addons.verify, [id], STATE_DISABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase12", [
|
||||
[Addons.verify, [id], STATE_ENABLED]
|
||||
]);
|
||||
|
||||
// And we uninstall it
|
||||
Phase("phase13", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Addons.uninstall, [id]],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase14", [
|
||||
[Addons.verifyNot, [id]]
|
||||
]);
|
||||
Phase("phase15", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase16", [
|
||||
[Addons.verifyNot, [id]]
|
||||
]);
|
46
services/sync/tests/tps/test_addon_reconciling.js
Normal file
46
services/sync/tests/tps/test_addon_reconciling.js
Normal file
@ -0,0 +1,46 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// This test verifies that record reconciling works as expected. It makes
|
||||
// similar changes to add-ons in separate profiles and does a sync to verify
|
||||
// the proper action is taken.
|
||||
EnableEngines(["addons"]);
|
||||
|
||||
let phases = {
|
||||
"phase01": "profile1",
|
||||
"phase02": "profile2",
|
||||
"phase03": "profile1",
|
||||
"phase04": "profile2",
|
||||
"phase05": "profile1",
|
||||
"phase06": "profile2"
|
||||
};
|
||||
|
||||
const id = "restartless-xpi@tests.mozilla.org";
|
||||
|
||||
// Install the add-on in 2 profiles.
|
||||
Phase("phase01", [
|
||||
[Addons.install, [id]],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase02", [
|
||||
[Sync],
|
||||
[Addons.verify, [id], STATE_ENABLED]
|
||||
]);
|
||||
|
||||
// Now we disable in one and uninstall in the other.
|
||||
Phase("phase03", [
|
||||
[Sync], // Get GUID updates, potentially.
|
||||
[Addons.setEnabled, [id], STATE_DISABLED],
|
||||
]);
|
||||
Phase("phase04", [
|
||||
[Addons.uninstall, [id]],
|
||||
]);
|
||||
|
||||
// When we sync, the uninstall should take precedence because it was newer.
|
||||
Phase("phase05", [
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase06", [
|
||||
[Sync],
|
||||
[Addons.verifyNot, [id]]
|
||||
]);
|
67
services/sync/tests/tps/test_addon_restartless_xpi.js
Normal file
67
services/sync/tests/tps/test_addon_restartless_xpi.js
Normal file
@ -0,0 +1,67 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
// This test verifies that install of restartless extensions syncs to
|
||||
// other profiles.
|
||||
EnableEngines(["addons"]);
|
||||
|
||||
let phases = {
|
||||
"phase01": "profile1",
|
||||
"phase02": "profile2",
|
||||
"phase03": "profile1",
|
||||
"phase04": "profile2",
|
||||
"phase05": "profile1",
|
||||
"phase06": "profile2",
|
||||
"phase07": "profile1",
|
||||
"phase08": "profile2"
|
||||
};
|
||||
|
||||
const id = "restartless-xpi@tests.mozilla.org";
|
||||
|
||||
// Verify install is synced
|
||||
Phase("phase01", [
|
||||
[Addons.verifyNot, [id]],
|
||||
[Addons.install, [id]],
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase02", [
|
||||
[Addons.verifyNot, [id]],
|
||||
[Sync],
|
||||
[Addons.verify, [id], STATE_ENABLED]
|
||||
]);
|
||||
|
||||
// Now disable and see that is is synced.
|
||||
Phase("phase03", [
|
||||
[Addons.setEnabled, [id], STATE_DISABLED],
|
||||
[Addons.verify, [id], STATE_DISABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase04", [
|
||||
[Sync],
|
||||
[Addons.verify, [id], STATE_DISABLED]
|
||||
]);
|
||||
|
||||
// Enable and see it is synced.
|
||||
Phase("phase05", [
|
||||
[Addons.setEnabled, [id], STATE_ENABLED],
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase06", [
|
||||
[Sync],
|
||||
[Addons.verify, [id], STATE_ENABLED]
|
||||
]);
|
||||
|
||||
// Uninstall and see it is synced.
|
||||
Phase("phase07", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Addons.uninstall, [id]],
|
||||
[Addons.verifyNot, [id]],
|
||||
[Sync]
|
||||
]);
|
||||
Phase("phase08", [
|
||||
[Addons.verify, [id], STATE_ENABLED],
|
||||
[Sync],
|
||||
[Addons.verifyNot, [id]]
|
||||
]);
|
27
services/sync/tests/tps/unsigned-xpi.xml
Normal file
27
services/sync/tests/tps/unsigned-xpi.xml
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<searchresults total_results="1">
|
||||
<addon id="5612">
|
||||
<name>Unsigned Test XPI</name>
|
||||
<type id="1">Extension</type>
|
||||
<guid>unsigned-xpi@tests.mozilla.org</guid>
|
||||
<slug>unsigned-xpi</slug>
|
||||
<version>1.0</version>
|
||||
|
||||
<compatible_applications><application>
|
||||
<name>Firefox</name>
|
||||
<application_id>1</application_id>
|
||||
<min_version>3.6</min_version>
|
||||
<max_version>*</max_version>
|
||||
<appID>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</appID>
|
||||
</application></compatible_applications>
|
||||
<all_compatible_os><os>ALL</os></all_compatible_os>
|
||||
|
||||
<install os="ALL" size="452">http://127.0.0.1:4567/unsigned.xpi</install>
|
||||
<created epoch="1252903662">
|
||||
2009-09-14T04:47:42Z
|
||||
</created>
|
||||
<last_updated epoch="1315255329">
|
||||
2011-09-05T20:42:09Z
|
||||
</last_updated>
|
||||
</addon>
|
||||
</searchresults>
|
Loading…
Reference in New Issue
Block a user