зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1308251 fix builtin cert testing for addon install and update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D80330
This commit is contained in:
Родитель
62a3d2cfa4
Коммит
58230c7d4b
|
@ -111,7 +111,10 @@ function run_install_tests(callback) {
|
|||
|
||||
// Runs tests with built-in certificates required, no certificate exceptions
|
||||
// and no hashes
|
||||
add_test(function() {
|
||||
add_test(async function test_builtin_required() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_INSTALL_REQUIREBUILTINCERTS, true]],
|
||||
});
|
||||
// Tests that a simple install works as expected.
|
||||
add_install_test(HTTP, null, SUCCESS);
|
||||
add_install_test(HTTPS, null, NETWORK_FAILURE);
|
||||
|
@ -173,7 +176,7 @@ add_test(function() {
|
|||
|
||||
// Runs tests without requiring built-in certificates, no certificate
|
||||
// exceptions and no hashes
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_not_required() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_INSTALL_REQUIREBUILTINCERTS, false]],
|
||||
});
|
||||
|
@ -244,9 +247,9 @@ add_test(() => {
|
|||
|
||||
// Runs tests with built-in certificates required, all certificate exceptions
|
||||
// and no hashes
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_required_overrides() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
clear: [[PREF_INSTALL_REQUIREBUILTINCERTS]],
|
||||
set: [[PREF_INSTALL_REQUIREBUILTINCERTS, true]],
|
||||
});
|
||||
|
||||
// Tests that a simple install works as expected.
|
||||
|
@ -310,7 +313,7 @@ add_test(async function() {
|
|||
|
||||
// Runs tests without requiring built-in certificates, all certificate
|
||||
// exceptions and no hashes
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_not_required_overrides() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_INSTALL_REQUIREBUILTINCERTS, false]],
|
||||
});
|
||||
|
|
|
@ -126,7 +126,10 @@ function run_update_tests(callback) {
|
|||
}
|
||||
|
||||
// Runs tests with built-in certificates required and no certificate exceptions.
|
||||
add_test(function() {
|
||||
add_test(async function test_builtin_required() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_UPDATE_REQUIREBUILTINCERTS, true]],
|
||||
});
|
||||
// Tests that a simple update.json retrieval works as expected.
|
||||
add_update_test(HTTP, null, SUCCESS);
|
||||
add_update_test(HTTPS, null, DOWNLOAD_ERROR);
|
||||
|
@ -188,7 +191,7 @@ add_test(function() {
|
|||
|
||||
// Runs tests without requiring built-in certificates and no certificate
|
||||
// exceptions.
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_not_required() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_UPDATE_REQUIREBUILTINCERTS, false]],
|
||||
});
|
||||
|
@ -258,9 +261,9 @@ add_test(() => {
|
|||
});
|
||||
|
||||
// Runs tests with built-in certificates required and all certificate exceptions.
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_required_overrides() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
clear: [[PREF_UPDATE_REQUIREBUILTINCERTS]],
|
||||
set: [[PREF_UPDATE_REQUIREBUILTINCERTS, true]],
|
||||
});
|
||||
|
||||
// Tests that a simple update.json retrieval works as expected.
|
||||
|
@ -324,7 +327,7 @@ add_test(async function() {
|
|||
|
||||
// Runs tests without requiring built-in certificates and all certificate
|
||||
// exceptions.
|
||||
add_test(async function() {
|
||||
add_test(async function test_builtin_not_required_overrides() {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[PREF_UPDATE_REQUIREBUILTINCERTS, false]],
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче