Bug 1446868: Part 2 - Convert remaining update.rdf tests to JSON format. r=aswan

MozReview-Commit-ID: 4ZIMdrvP5pJ

--HG--
rename : toolkit/mozapps/extensions/test/browser/browser_updatessl.rdf => toolkit/mozapps/extensions/test/browser/browser_updatessl.json
rename : toolkit/mozapps/extensions/test/browser/browser_updatessl.rdf^headers^ => toolkit/mozapps/extensions/test/browser/browser_updatessl.json^headers^
rename : toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.rdf => toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.rdf => toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.rdf => toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_1.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_1.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_2.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_2.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_3.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_3.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_4.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_4.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_5.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug470377/update_5.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete_legacy.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer_legacy.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore_legacy.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_dictionary.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_dictionary.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_ignore.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_ignore.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_normal.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_normal.json
rename : toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_strict.rdf => toolkit/mozapps/extensions/test/xpcshell/data/test_updatecompatmode_strict.json
extra : rebase_source : 1e05503ba170e5df05d66346ba4808fb9259c445
This commit is contained in:
Kris Maglione 2018-03-18 22:21:46 -07:00
Родитель 0257b6847c
Коммит 1bc713ddbb
62 изменённых файлов: 3015 добавлений и 3364 удалений

Просмотреть файл

@ -26,7 +26,7 @@ AddonTestUtils.init(this);
// Allow for unsigned addons.
AddonTestUtils.overrideCertDB();
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "42", "42");
add_task(async function test_privacy_update() {
// Create a object to hold the values to which we will initialize the prefs.

Просмотреть файл

@ -15,8 +15,8 @@ support-files =
releaseNotes.xhtml
blockNoPlugins.xml
blockPluginHard.xml
browser_updatessl.rdf
browser_updatessl.rdf^headers^
browser_updatessl.json
browser_updatessl.json^headers^
browser_install.rdf
browser_install.rdf^headers^
browser_install1_3.xpi

Просмотреть файл

@ -1,27 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:install1@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>https://example.com/browser/toolkit/mozapps/extensions/test/browser/browser_install1_3.xpi</em:updateLink>
<em:updateHash>sha1:4f0f4391914e3e036beca50cbac33958e5269643</em:updateHash>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
{
"addons": {
"install1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2.0",
"update_link": "https://example.com/browser/toolkit/mozapps/extensions/test/browser/browser_install1_3.xpi",
"update_hash": "sha1:4f0f4391914e3e036beca50cbac33958e5269643"
}
]
}
}
}

Просмотреть файл

@ -6,7 +6,7 @@ var tempScope = {};
ChromeUtils.import("resource://gre/modules/addons/AddonUpdateChecker.jsm", tempScope);
var AddonUpdateChecker = tempScope.AddonUpdateChecker;
const updaterdf = RELATIVE_DIR + "browser_updatessl.rdf";
const updatejson = RELATIVE_DIR + "browser_updatessl.json";
const redirect = RELATIVE_DIR + "redirect.sjs?";
const SUCCESS = 0;
const DOWNLOAD_ERROR = AddonManager.ERROR_DOWNLOAD_ERROR;
@ -78,11 +78,11 @@ function run_update_tests(callback) {
let [mainURL, redirectURL, expectedStatus] = gTests.shift();
if (redirectURL) {
var url = mainURL + redirect + redirectURL + updaterdf;
var url = mainURL + redirect + redirectURL + updatejson;
var message = "Should have seen the right result for an update check redirected from " +
mainURL + " to " + redirectURL;
} else {
url = mainURL + updaterdf;
url = mainURL + updatejson;
message = "Should have seen the right result for an update check from " +
mainURL;
}
@ -116,7 +116,7 @@ function addCertOverrides() {
// Runs tests with built-in certificates required and no certificate exceptions.
add_test(function() {
// Tests that a simple update.rdf retrieval works as expected.
// Tests that a simple update.json retrieval works as expected.
add_update_test(HTTP, null, SUCCESS);
add_update_test(HTTPS, null, DOWNLOAD_ERROR);
add_update_test(NOCERT, null, DOWNLOAD_ERROR);
@ -180,7 +180,7 @@ add_test(function() {
add_test(function() {
Services.prefs.setBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, false);
// Tests that a simple update.rdf retrieval works as expected.
// Tests that a simple update.json retrieval works as expected.
add_update_test(HTTP, null, SUCCESS);
add_update_test(HTTPS, null, SUCCESS);
add_update_test(NOCERT, null, DOWNLOAD_ERROR);
@ -244,7 +244,7 @@ add_test(function() {
Services.prefs.clearUserPref(PREF_UPDATE_REQUIREBUILTINCERTS);
addCertOverrides();
// Tests that a simple update.rdf retrieval works as expected.
// Tests that a simple update.json retrieval works as expected.
add_update_test(HTTP, null, SUCCESS);
add_update_test(HTTPS, null, DOWNLOAD_ERROR);
add_update_test(NOCERT, null, DOWNLOAD_ERROR);
@ -308,7 +308,7 @@ add_test(function() {
add_test(function() {
Services.prefs.setBoolPref(PREF_UPDATE_REQUIREBUILTINCERTS, false);
// Tests that a simple update.rdf retrieval works as expected.
// Tests that a simple update.json retrieval works as expected.
add_update_test(HTTP, null, SUCCESS);
add_update_test(HTTPS, null, SUCCESS);
add_update_test(NOCERT, null, SUCCESS);

Просмотреть файл

@ -0,0 +1,17 @@
{
"addons": {
"addon1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "20"
}
},
"version": "2.0"
}
]
}
}
}

Просмотреть файл

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:addon1@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>20</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,102 @@
{
"addons": {
"softblock1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft1_2.xpi"
}
]
},
"softblock3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft3_2.xpi"
}
]
},
"softblock5@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft5_2.xpi"
}
]
},
"softblock4@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft4_2.xpi"
}
]
},
"softblock2@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft2_2.xpi"
}
]
},
"regexpblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_regexp1_2.xpi"
}
]
},
"hardblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/addons/blocklist_hard1_2.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:softblock1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft1_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock2@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft2_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock3@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft3_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock4@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft4_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:theme:softblock5@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft5_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:hardblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_hard1_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:regexpblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_regexp1_2.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,102 @@
{
"addons": {
"softblock1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft1_3.xpi"
}
]
},
"softblock3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft3_3.xpi"
}
]
},
"regexpblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_regexp1_3.xpi"
}
]
},
"hardblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_hard1_3.xpi"
}
]
},
"softblock5@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft5_3.xpi"
}
]
},
"softblock4@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft4_3.xpi"
}
]
},
"softblock2@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "3",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft2_3.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:softblock1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft1_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock2@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft2_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock3@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft3_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock4@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft4_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:theme:softblock5@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft5_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:hardblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_hard1_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:regexpblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>3</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_regexp1_3.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,102 @@
{
"addons": {
"regexpblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_regexp1_1.xpi"
}
]
},
"hardblock@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_hard1_1.xpi"
}
]
},
"softblock5@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft5_1.xpi"
}
]
},
"softblock4@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft4_1.xpi"
}
]
},
"softblock3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft3_1.xpi"
}
]
},
"softblock2@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft2_1.xpi"
}
]
},
"softblock1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "0",
"advisory_max_version": "*"
}
},
"version": "4",
"update_link": "http://localhost:%PORT%/addons/blocklist_soft1_1.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:softblock1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft1_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock2@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft2_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock3@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft3_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:softblock4@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft4_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:theme:softblock5@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_soft5_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:hardblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_hard1_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:regexpblock@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>4</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>0</em:minVersion>
<em:maxVersion>*</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/blocklist_regexp1_1.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,46 @@
{
"addons": {
"addon2@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
},
"addon3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
},
"addon1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:addon1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<!-- app id compatible update available -->
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:addon2@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<!-- app id compatible update available -->
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
<RDF:Description about="urn:mozilla:extension:addon3@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<!-- app id compatible update available -->
<RDF:li>
<RDF:Description>
<em:version>2</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_bug470377_1@tests.mozilla.org": {
"updates": [
{
"applications": {
"unknown@tests.mozilla.org": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "1",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:test_bug470377_1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>unknown@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_bug470377_2@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "1",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:test_bug470377_2@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_bug470377_3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "1",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:test_bug470377_3@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_bug470377_4@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "1",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:test_bug470377_4@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>toolkit@mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_bug470377_5@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "3"
}
},
"version": "1",
"update_link": "http://localhost:%PORT%/broken.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:test_bug470377_5@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>3</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/broken.xpi</em:updateLink>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,17 @@
{
"addons": {
"addon1@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "1"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<RDF:Description about="urn:mozilla:extension:addon1@tests.mozilla.org">
<em:updates>
<RDF:Seq>
<RDF:li>
<RDF:Description>
<em:version>1</em:version>
<em:targetApplication>
<RDF:Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
</RDF:Description>
</em:targetApplication>
</RDF:Description>
</RDF:li>
</RDF:Seq>
</em:updates>
</RDF:Description>
</RDF:RDF>

Просмотреть файл

@ -0,0 +1,30 @@
{
"addons": {
"addon3@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "1.0"
}
]
},
"addon4@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "1.0"
}
]
}
}
}

Просмотреть файл

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:addon3@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>1.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
<Description about="urn:mozilla:extension:addon4@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>1.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:test_delay_update_complete@tests.mozilla.org">
<em:updates>
<Seq>
<!-- app id compatible update available -->
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_delay_update_complete_v2.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_delay_update_complete@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_delay_update_complete_v2.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:test_delay_update_defer@tests.mozilla.org">
<em:updates>
<Seq>
<!-- app id compatible update available -->
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_delay_update_defer_v2.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_delay_update_defer@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_delay_update_defer_v2.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:test_delay_update_ignore@tests.mozilla.org">
<em:updates>
<Seq>
<!-- app id compatible update available -->
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_delay_update_ignore_v2.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"test_delay_update_ignore@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_delay_update_ignore_v2.xpi"
}
]
}
}
}

Просмотреть файл

@ -0,0 +1,46 @@
{
"addons": {
"ab-CD@dictionaries.addons.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_dictionary_3.xpi"
}
]
},
"gh@dictionaries.addons.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_dictionary_5.xpi"
}
]
},
"ef@dictionaries.addons.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "1"
}
},
"version": "2.0",
"update_link": "http://localhost:%PORT%/addons/test_dictionary_4.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:ab-CD@dictionaries.addons.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_dictionary_3.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
<Description about="urn:mozilla:extension:ef@dictionaries.addons.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_dictionary_4.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
<Description about="urn:mozilla:extension:gh@dictionaries.addons.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>1</em:maxVersion>
<em:updateLink>http://localhost:%PORT%/addons/test_dictionary_5.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"compatmode-ignore@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "2.0",
"update_link": "https://localhost:%PORT%/addons/test1.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:compatmode-ignore@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
<em:updateLink>https://localhost:%PORT%/addons/test1.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"compatmode-normal@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "2.0",
"update_link": "https://localhost:%PORT%/addons/test1.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:compatmode-normal@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
<em:updateLink>https://localhost:%PORT%/addons/test1.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -0,0 +1,18 @@
{
"addons": {
"compatmode-strict@tests.mozilla.org": {
"updates": [
{
"applications": {
"gecko": {
"strict_min_version": "1",
"advisory_max_version": "2"
}
},
"version": "2.0",
"update_link": "https://localhost:%PORT%/addons/test1.xpi"
}
]
}
}
}

Просмотреть файл

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:compatmode-strict@tests.mozilla.org">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0</em:version>
<em:targetApplication>
<Description>
<em:id>xpcshell@tests.mozilla.org</em:id>
<em:minVersion>1</em:minVersion>
<em:maxVersion>2</em:maxVersion>
<em:updateLink>https://localhost:%PORT%/addons/test1.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>

Просмотреть файл

@ -15,7 +15,7 @@ const profileDir = gProfD.clone();
profileDir.append("extensions");
// register static files with server and interpolate port numbers in them
mapFile("/data/test_backgroundupdate.rdf", testserver);
mapFile("/data/test_backgroundupdate.json", testserver);
function run_test() {
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
@ -55,7 +55,7 @@ function run_test_2() {
writeInstallRDFForExtension({
id: "addon1@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_backgroundupdate.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_backgroundupdate.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -67,7 +67,7 @@ function run_test_2() {
writeInstallRDFForExtension({
id: "addon2@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_backgroundupdate.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_backgroundupdate.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -92,7 +92,7 @@ function run_test_2() {
// Background update uses a different pref, if set
Services.prefs.setCharPref("extensions.update.background.url",
"http://localhost:" + gPort + "/data/test_backgroundupdate.rdf");
"http://localhost:" + gPort + "/data/test_backgroundupdate.json");
restartManager();

Просмотреть файл

@ -11,7 +11,7 @@ testserver.start(-1);
gPort = testserver.identity.primaryPort;
// register static files with server and interpolate port numbers in them
mapFile("/data/test_corrupt.rdf", testserver);
mapFile("/data/test_corrupt.json", testserver);
// The test extension uses an insecure update url.
Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
@ -45,7 +45,7 @@ var addon3 = {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -58,7 +58,7 @@ var addon4 = {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -35,9 +35,9 @@ var testserver = createHttpServer();
gPort = testserver.identity.primaryPort;
// register static files with server and interpolate port numbers in them
mapFile("/data/blocklistchange/addon_update1.rdf", testserver);
mapFile("/data/blocklistchange/addon_update2.rdf", testserver);
mapFile("/data/blocklistchange/addon_update3.rdf", testserver);
mapFile("/data/blocklistchange/addon_update1.json", testserver);
mapFile("/data/blocklistchange/addon_update2.json", testserver);
mapFile("/data/blocklistchange/addon_update3.json", testserver);
mapFile("/data/blocklistchange/addon_change.xml", testserver);
mapFile("/data/blocklistchange/app_update.xml", testserver);
mapFile("/data/blocklistchange/blocklist_update1.xml", testserver);
@ -51,7 +51,7 @@ var softblock1_1 = {
id: "softblock1@tests.mozilla.org",
version: "1.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -63,7 +63,7 @@ var softblock1_2 = {
id: "softblock1@tests.mozilla.org",
version: "2.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -75,7 +75,7 @@ var softblock1_3 = {
id: "softblock1@tests.mozilla.org",
version: "3.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -87,7 +87,7 @@ var softblock2_1 = {
id: "softblock2@tests.mozilla.org",
version: "1.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -99,7 +99,7 @@ var softblock2_2 = {
id: "softblock2@tests.mozilla.org",
version: "2.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -111,7 +111,7 @@ var softblock2_3 = {
id: "softblock2@tests.mozilla.org",
version: "3.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -123,7 +123,7 @@ var softblock3_1 = {
id: "softblock3@tests.mozilla.org",
version: "1.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -135,7 +135,7 @@ var softblock3_2 = {
id: "softblock3@tests.mozilla.org",
version: "2.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -147,7 +147,7 @@ var softblock3_3 = {
id: "softblock3@tests.mozilla.org",
version: "3.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -159,7 +159,7 @@ var softblock4_1 = {
id: "softblock4@tests.mozilla.org",
version: "1.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -171,7 +171,7 @@ var softblock4_2 = {
id: "softblock4@tests.mozilla.org",
version: "2.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -183,7 +183,7 @@ var softblock4_3 = {
id: "softblock4@tests.mozilla.org",
version: "3.0",
name: "Softblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -195,7 +195,7 @@ var hardblock_1 = {
id: "hardblock@tests.mozilla.org",
version: "1.0",
name: "Hardblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -207,7 +207,7 @@ var hardblock_2 = {
id: "hardblock@tests.mozilla.org",
version: "2.0",
name: "Hardblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -219,7 +219,7 @@ var hardblock_3 = {
id: "hardblock@tests.mozilla.org",
version: "3.0",
name: "Hardblocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -231,7 +231,7 @@ var regexpblock_1 = {
id: "regexpblock@tests.mozilla.org",
version: "1.0",
name: "RegExp-blocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update1.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -243,7 +243,7 @@ var regexpblock_2 = {
id: "regexpblock@tests.mozilla.org",
version: "2.0",
name: "RegExp-blocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update2.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -255,7 +255,7 @@ var regexpblock_3 = {
id: "regexpblock@tests.mozilla.org",
version: "3.0",
name: "RegExp-blocked add-on",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.rdf",
updateURL: "http://localhost:" + gPort + "/data/blocklistchange/addon_update3.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -7,7 +7,7 @@ var testserver = new HttpServer();
testserver.start(-1);
gPort = testserver.identity.primaryPort;
var gTestURL = "http://127.0.0.1:" + gPort + "/update.rdf?itemID=%ITEM_ID%&custom1=%CUSTOM1%&custom2=%CUSTOM2%";
var gTestURL = "http://127.0.0.1:" + gPort + "/update.json?itemID=%ITEM_ID%&custom1=%CUSTOM1%&custom2=%CUSTOM2%";
var gExpectedQuery = "itemID=test@mozilla.org&custom1=custom_parameter_1&custom2=custom_parameter_2";
var gSeenExpectedURL = false;
@ -38,7 +38,7 @@ function initTest() {
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9");
// Configure the HTTP server.
testserver.registerPathHandler("/update.rdf", function(aRequest, aResponse) {
testserver.registerPathHandler("/update.json", function(aRequest, aResponse) {
gSeenExpectedURL = aRequest.queryString == gExpectedQuery;
aResponse.setStatusLine(null, 404, "Not Found");
});

Просмотреть файл

@ -20,7 +20,7 @@ function run_test() {
writeInstallRDFForExtension({
id: "addon1@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_update.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_update.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -17,7 +17,7 @@ ChromeUtils.import("resource://testing-common/httpd.js");
var testserver = new HttpServer();
testserver.start(-1);
gPort = testserver.identity.primaryPort;
mapFile("/data/test_bug655254.rdf", testserver);
mapFile("/data/test_bug655254.json", testserver);
var userDir = gProfD.clone();
userDir.append("extensions2");
@ -40,7 +40,7 @@ var addon1 = {
id: "addon1@tests.mozilla.org",
version: "1.0",
name: "Test 1",
updateURL: "http://localhost:" + gPort + "/data/test_bug655254.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_bug655254.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -13,7 +13,7 @@ gPort = testserver.identity.primaryPort;
// register files with server
testserver.registerDirectory("/addons/", do_get_file("addons"));
mapFile("/data/test_corrupt.rdf", testserver);
mapFile("/data/test_corrupt.json", testserver);
// The test extension uses an insecure update url.
Services.prefs.setBoolPref(PREF_EM_CHECK_UPDATE_SECURITY, false);
@ -48,7 +48,7 @@ var addon3 = {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -61,7 +61,7 @@ var addon4 = {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -13,7 +13,7 @@ gPort = testserver.identity.primaryPort;
// register files with server
testserver.registerDirectory("/addons/", do_get_file("addons"));
mapFile("/data/test_corrupt.rdf", testserver);
mapFile("/data/test_corrupt.json", testserver);
// The test extension uses an insecure update url.
@ -49,7 +49,7 @@ var addon3 = {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -62,7 +62,7 @@ var addon4 = {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -26,9 +26,9 @@ createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "42");
// Create and configure the HTTP server.
let testserver = createHttpServer();
gPort = testserver.identity.primaryPort;
mapFile("/data/test_delay_updates_complete.rdf", testserver);
mapFile("/data/test_delay_updates_ignore.rdf", testserver);
mapFile("/data/test_delay_updates_defer.rdf", testserver);
mapFile("/data/test_delay_updates_complete_legacy.json", testserver);
mapFile("/data/test_delay_updates_ignore_legacy.json", testserver);
mapFile("/data/test_delay_updates_defer_legacy.json", testserver);
testserver.registerDirectory("/addons/", do_get_file("addons"));
function createIgnoreAddon() {
@ -37,7 +37,7 @@ function createIgnoreAddon() {
version: "1.0",
bootstrap: true,
unpack: true,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_ignore.rdf`,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_ignore_legacy.json`,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -58,7 +58,7 @@ function createCompleteAddon() {
version: "1.0",
bootstrap: true,
unpack: true,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_complete.rdf`,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_complete_legacy.json`,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -79,7 +79,7 @@ function createDeferAddon() {
version: "1.0",
bootstrap: true,
unpack: true,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_defer.rdf`,
updateURL: `http://localhost:${gPort}/data/test_delay_updates_defer_legacy.json`,
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -29,7 +29,7 @@ gPort = testserver.identity.primaryPort;
// register files with server
testserver.registerDirectory("/addons/", do_get_file("addons"));
mapFile("/data/test_dictionary.rdf", testserver);
mapFile("/data/test_dictionary.json", testserver);
/**
* This object is both a factory and an mozISpellCheckingEngine implementation (so, it
@ -669,7 +669,7 @@ function run_test_27() {
writeInstallRDFForExtension({
id: "ab-CD@dictionaries.addons.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -715,7 +715,7 @@ function run_test_28() {
id: "ef@dictionaries.addons.mozilla.org",
version: "1.0",
type: "64",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -761,7 +761,7 @@ function run_test_29() {
id: "gh@dictionaries.addons.mozilla.org",
version: "1.0",
type: "64",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_dictionary.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
var testserver = new HttpServer();
testserver.start(-1);
gPort = testserver.identity.primaryPort;
mapFile("/data/test_corrupt.rdf", testserver);
mapFile("/data/test_corrupt.json", testserver);
testserver.registerDirectory("/addons/", do_get_file("addons"));
// The test extension uses an insecure update url.
@ -46,7 +46,7 @@ var addon3 = {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -59,7 +59,7 @@ var addon4 = {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -10,7 +10,7 @@ ChromeUtils.import("resource://gre/modules/osfile.jsm");
var testserver = new HttpServer();
testserver.start(-1);
gPort = testserver.identity.primaryPort;
mapFile("/data/test_corrupt.rdf", testserver);
mapFile("/data/test_corrupt.json", testserver);
testserver.registerDirectory("/addons/", do_get_file("addons"));
// The test extension uses an insecure update url.
@ -46,7 +46,7 @@ var addon3 = {
id: "addon3@tests.mozilla.org",
version: "1.0",
name: "Test 3",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -59,7 +59,7 @@ var addon4 = {
id: "addon4@tests.mozilla.org",
version: "1.0",
name: "Test 4",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_corrupt.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -82,19 +82,25 @@ function createInstall(url) {
function serveUpdateRDF(leafName) {
gServer.registerPathHandler("/update.rdf", function(request, response) {
let updateData = {};
updateData[ID] = [{
version: "2.0",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "4",
maxVersion: "6",
updateLink: "http://localhost:4444/" + leafName
}]
}];
response.setStatusLine(request.httpVersion, 200, "OK");
response.write(createUpdateRDF(updateData));
response.write(JSON.stringify({
addons: {
[ID]: {
updates: [
{
version: "2.0",
update_link: "http://localhost:4444/" + leafName,
applications: {
gecko: {
strict_min_version: "4",
advisory_max_version: "6",
},
},
},
],
},
},
}));
});
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -51,7 +51,7 @@ function dataHandler(aRequest, aResponse) {
}
var testserver = new HttpServer();
testserver.registerDirectory("/addons/", do_get_file("addons"));
testserver.registerPathHandler("/data/test_update.rdf", dataHandler);
testserver.registerPathHandler("/data/test_update.json", dataHandler);
testserver.start(-1);
gPort = testserver.identity.primaryPort;
@ -59,7 +59,7 @@ gPort = testserver.identity.primaryPort;
writeInstallRDFForExtension({
id: "addon1@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_update.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_update.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -89,7 +89,7 @@ add_task(async function cancel_during_check() {
// Now complete the HTTP request
let file = do_get_cwd();
file.append("data");
file.append("test_update.rdf");
file.append("test_update.json");
let data = loadFile(file);
response.write(data);
response.finish();
@ -123,7 +123,7 @@ add_task(async function shutdown_during_check() {
// Now complete the HTTP request
let file = do_get_cwd();
file.append("data");
file.append("test_update.rdf");
file.append("test_update.json");
let data = loadFile(file);
response.write(data);
response.finish();

Просмотреть файл

@ -13,9 +13,9 @@ ChromeUtils.import("resource://testing-common/httpd.js");
var testserver = new HttpServer();
testserver.start(-1);
gPort = testserver.identity.primaryPort;
mapFile("/data/test_updatecompatmode_ignore.rdf", testserver);
mapFile("/data/test_updatecompatmode_normal.rdf", testserver);
mapFile("/data/test_updatecompatmode_strict.rdf", testserver);
mapFile("/data/test_updatecompatmode_ignore.json", testserver);
mapFile("/data/test_updatecompatmode_normal.json", testserver);
mapFile("/data/test_updatecompatmode_strict.json", testserver);
testserver.registerDirectory("/addons/", do_get_file("addons"));
const profileDir = gProfD.clone();
@ -28,7 +28,7 @@ function run_test() {
writeInstallRDFForExtension({
id: "compatmode-normal@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -40,7 +40,7 @@ function run_test() {
writeInstallRDFForExtension({
id: "compatmode-strict@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -52,7 +52,7 @@ function run_test() {
writeInstallRDFForExtension({
id: "compatmode-strict-optin@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",
@ -65,7 +65,7 @@ function run_test() {
writeInstallRDFForExtension({
id: "compatmode-ignore@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.rdf",
updateURL: "http://localhost:" + gPort + "/data/test_updatecompatmode_%COMPATIBILITY_MODE%.json",
targetApplications: [{
id: "xpcshell@tests.mozilla.org",
minVersion: "1",

Просмотреть файл

@ -13,7 +13,6 @@ Services.prefs.setBoolPref(PREF_EM_STRICT_COMPATIBILITY, false);
var testserver = createHttpServer();
gPort = testserver.identity.primaryPort;
mapFile("/data/test_update.rdf", testserver);
mapFile("/data/test_update.json", testserver);
mapFile("/data/test_update_addons.json", testserver);
mapFile("/data/test_update_compat.json", testserver);
@ -25,86 +24,78 @@ profileDir.append("extensions");
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1");
let testParams = [
{ updateFile: "test_update.rdf",
appId: "xpcshell@tests.mozilla.org" },
{ updateFile: "test_update.json",
appId: "toolkit@mozilla.org" },
];
const updateFile = "test_update.json";
const appId = "toolkit@mozilla.org";
for (let test of testParams) {
let { updateFile, appId } = test;
// Test that the update check correctly observes the
// extensions.strictCompatibility pref and compatibility overrides.
add_test(function() {
writeInstallRDFForExtension({
id: "addon9@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/" + updateFile,
targetApplications: [{
id: appId,
minVersion: "0.1",
maxVersion: "0.2"
}],
name: "Test Addon 9",
}, profileDir);
// Test that the update check correctly observes the
// extensions.strictCompatibility pref and compatibility overrides.
add_test(function() {
writeInstallRDFForExtension({
id: "addon9@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/" + updateFile,
targetApplications: [{
id: appId,
minVersion: "0.1",
maxVersion: "0.2"
}],
name: "Test Addon 9",
}, profileDir);
restartManager();
restartManager();
AddonManager.addInstallListener({
onNewInstall(aInstall) {
if (aInstall.existingAddon.id != "addon9@tests.mozilla.org")
do_throw("Saw unexpected onNewInstall for " + aInstall.existingAddon.id);
Assert.equal(aInstall.version, "4.0");
},
onDownloadFailed(aInstall) {
run_next_test();
}
});
AddonManager.addInstallListener({
onNewInstall(aInstall) {
if (aInstall.existingAddon.id != "addon9@tests.mozilla.org")
do_throw("Saw unexpected onNewInstall for " + aInstall.existingAddon.id);
Assert.equal(aInstall.version, "4.0");
Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
`http://localhost:${gPort}/data/test_update_addons.json`);
Services.prefs.setCharPref(PREF_COMPAT_OVERRIDES,
`http://localhost:${gPort}/data/test_update_compat.json`);
Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true);
AddonManagerInternal.backgroundUpdateCheck();
});
// Test that the update check correctly observes when an addon opts-in to
// strict compatibility checking.
add_test(function() {
writeInstallRDFForExtension({
id: "addon11@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/" + updateFile,
targetApplications: [{
id: appId,
minVersion: "0.1",
maxVersion: "0.2"
}],
name: "Test Addon 11",
}, profileDir);
restartManager();
AddonManager.getAddonByID("addon11@tests.mozilla.org", function(a11) {
Assert.notEqual(a11, null);
a11.findUpdates({
onCompatibilityUpdateAvailable() {
do_throw("Should not have seen compatibility information");
},
onDownloadFailed(aInstall) {
onUpdateAvailable() {
do_throw("Should not have seen an available update");
},
onUpdateFinished() {
run_next_test();
}
});
Services.prefs.setCharPref(PREF_GETADDONS_BYIDS,
`http://localhost:${gPort}/data/test_update_addons.json`);
Services.prefs.setCharPref(PREF_COMPAT_OVERRIDES,
`http://localhost:${gPort}/data/test_update_compat.json`);
Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true);
AddonManagerInternal.backgroundUpdateCheck();
}, AddonManager.UPDATE_WHEN_USER_REQUESTED);
});
// Test that the update check correctly observes when an addon opts-in to
// strict compatibility checking.
add_test(function() {
writeInstallRDFForExtension({
id: "addon11@tests.mozilla.org",
version: "1.0",
updateURL: "http://localhost:" + gPort + "/data/" + updateFile,
targetApplications: [{
id: appId,
minVersion: "0.1",
maxVersion: "0.2"
}],
name: "Test Addon 11",
}, profileDir);
restartManager();
AddonManager.getAddonByID("addon11@tests.mozilla.org", function(a11) {
Assert.notEqual(a11, null);
a11.findUpdates({
onCompatibilityUpdateAvailable() {
do_throw("Should not have seen compatibility information");
},
onUpdateAvailable() {
do_throw("Should not have seen an available update");
},
onUpdateFinished() {
run_next_test();
}
}, AddonManager.UPDATE_WHEN_USER_REQUESTED);
});
});
}
});

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -32,21 +32,21 @@ function run_test() {
run_next_test();
}
const UPDATE_FILE = "test_updatecheck.json";
// Test that a basic update check returns the expected available updates
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
let updates = await checkUpdates("updatecheck1@tests.mozilla.org", file);
let updates = await checkUpdates("updatecheck1@tests.mozilla.org", UPDATE_FILE);
equal(updates.length, 5);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(updates);
notEqual(update, null);
equal(update.version, "3.0");
update = AddonUpdateChecker.getCompatibilityUpdate(updates, "2");
notEqual(update, null);
equal(update.version, "2.0");
equal(update.targetApplications[0].minVersion, "1");
equal(update.targetApplications[0].maxVersion, "2");
}
equal(updates.length, 5);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(updates);
notEqual(update, null);
equal(update.version, "3.0");
update = AddonUpdateChecker.getCompatibilityUpdate(updates, "2");
notEqual(update, null);
equal(update.version, "2.0");
equal(update.targetApplications[0].minVersion, "1");
equal(update.targetApplications[0].maxVersion, "2");
});
/*
@ -65,24 +65,20 @@ add_task(async function() {
*/
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
try {
await checkUpdates("test_bug378216_5@tests.mozilla.org",
file);
throw "Expected the update check to fail";
} catch (e) {}
}
try {
await checkUpdates("test_bug378216_5@tests.mozilla.org",
UPDATE_FILE);
throw "Expected the update check to fail";
} catch (e) {}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
try {
await checkUpdates("test_bug378216_7@tests.mozilla.org",
file);
try {
await checkUpdates("test_bug378216_7@tests.mozilla.org",
UPDATE_FILE);
throw "Expected the update check to fail";
} catch (e) {}
}
throw "Expected the update check to fail";
} catch (e) {}
});
add_task(async function() {
@ -97,136 +93,108 @@ add_task(async function() {
throw "Expected the update check to fail";
} catch (e) {}
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_8@tests.mozilla.org",
file);
equal(updates.length, 1);
ok(!("updateURL" in updates[0]));
let updates = await checkUpdates("test_bug378216_8@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
ok(!("updateURL" in updates[0]));
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_9@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_10@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_11@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_12@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
Assert.equal(false, "updateURL" in updates[0]);
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_13@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
});
add_task(async function() {
let updates = await checkUpdates("test_bug378216_14@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 0);
});
add_task(async function() {
try {
await checkUpdates("test_bug378216_15@tests.mozilla.org",
UPDATE_FILE);
throw "Update check should have failed";
} catch (e) {
equal(e.status, AddonManager.ERROR_PARSE_ERROR);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_9@tests.mozilla.org",
file);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
}
let updates = await checkUpdates("ignore-compat@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 3);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true);
notEqual(update, null);
equal(update.version, 2);
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_10@tests.mozilla.org",
file);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
}
let updates = await checkUpdates("compat-override@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 3);
let overrides = [{
type: "incompatible",
minVersion: 1,
maxVersion: 2,
appID: "xpcshell@tests.mozilla.org",
appMinVersion: 0.1,
appMaxVersion: 0.2
}, {
type: "incompatible",
minVersion: 2,
maxVersion: 2,
appID: "xpcshell@tests.mozilla.org",
appMinVersion: 1,
appMaxVersion: 2
}];
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true, false, overrides);
notEqual(update, null);
equal(update.version, 1);
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_11@tests.mozilla.org",
file);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_12@tests.mozilla.org",
file);
equal(updates.length, 1);
Assert.equal(false, "updateURL" in updates[0]);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf",
"test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_13@tests.mozilla.org",
file);
equal(updates.length, 1);
equal(updates[0].version, "2.0");
ok("updateURL" in updates[0]);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
let updates = await checkUpdates("test_bug378216_14@tests.mozilla.org",
file);
equal(updates.length, 0);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.json"]) {
try {
await checkUpdates("test_bug378216_15@tests.mozilla.org",
file);
throw "Update check should have failed";
} catch (e) {
equal(e.status, AddonManager.ERROR_PARSE_ERROR);
}
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
let updates = await checkUpdates("ignore-compat@tests.mozilla.org",
file);
equal(updates.length, 3);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true);
notEqual(update, null);
equal(update.version, 2);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
let updates = await checkUpdates("compat-override@tests.mozilla.org",
file);
equal(updates.length, 3);
let overrides = [{
type: "incompatible",
minVersion: 1,
maxVersion: 2,
appID: "xpcshell@tests.mozilla.org",
appMinVersion: 0.1,
appMaxVersion: 0.2
}, {
type: "incompatible",
minVersion: 2,
maxVersion: 2,
appID: "xpcshell@tests.mozilla.org",
appMinVersion: 1,
appMaxVersion: 2
}];
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true, false, overrides);
notEqual(update, null);
equal(update.version, 1);
}
});
add_task(async function() {
for (let file of ["test_updatecheck.rdf", "test_updatecheck.json"]) {
let updates = await checkUpdates("compat-strict-optin@tests.mozilla.org",
file);
equal(updates.length, 1);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true, false);
equal(update, null);
}
let updates = await checkUpdates("compat-strict-optin@tests.mozilla.org",
UPDATE_FILE);
equal(updates.length, 1);
let update = AddonUpdateChecker.getNewestCompatibleUpdate(
updates, null, null, true, false);
equal(update, null);
});