зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1782685 - Remove MV3 requirement from DNR r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D174533
This commit is contained in:
Родитель
6bb6a718dc
Коммит
91b680a54e
|
@ -10,24 +10,21 @@
|
|||
"$extend": "Permission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": ["declarativeNetRequest"],
|
||||
"min_manifest_version": 3
|
||||
"enum": ["declarativeNetRequest"]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"$extend": "OptionalPermission",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": ["declarativeNetRequestFeedback"],
|
||||
"min_manifest_version": 3
|
||||
"enum": ["declarativeNetRequestFeedback"]
|
||||
}]
|
||||
},
|
||||
{
|
||||
"$extend": "PermissionNoPrompt",
|
||||
"choices": [{
|
||||
"type": "string",
|
||||
"enum": ["declarativeNetRequestWithHostAccess"],
|
||||
"min_manifest_version": 3
|
||||
"enum": ["declarativeNetRequestWithHostAccess"]
|
||||
}]
|
||||
},
|
||||
{
|
||||
|
@ -35,7 +32,6 @@
|
|||
"properties": {
|
||||
"declarative_net_request": {
|
||||
"type": "object",
|
||||
"min_manifest_version": 3,
|
||||
"optional": true,
|
||||
"additionalProperties": { "$ref": "UnrecognizedProperty" },
|
||||
"properties": {
|
||||
|
|
|
@ -171,42 +171,21 @@ add_task(async function dnr_feedback_apis_disabled_by_default() {
|
|||
});
|
||||
});
|
||||
|
||||
// TODO bug 1782685: Remove "min_manifest_version":3 from DNR permissions.
|
||||
add_task(async function dnr_restricted_to_mv3() {
|
||||
let { messages } = await promiseConsoleOutput(async () => {
|
||||
// Manifest version-restricted permissions result in schema-generated
|
||||
// warnings. Don't fail when the "unrecognized" permission appear, to allow
|
||||
// us to check for warning log messages below.
|
||||
ExtensionTestUtils.failOnSchemaWarnings(false);
|
||||
await testAvailability({
|
||||
allowDNRFeedback: true,
|
||||
testExpectations: {
|
||||
declarativeNetRequest_available: false,
|
||||
},
|
||||
manifest: {
|
||||
manifest_version: 2,
|
||||
permissions: [
|
||||
"declarativeNetRequest",
|
||||
"declarativeNetRequestFeedback",
|
||||
"declarativeNetRequestWithHostAccess",
|
||||
],
|
||||
},
|
||||
});
|
||||
ExtensionTestUtils.failOnSchemaWarnings(true);
|
||||
});
|
||||
|
||||
AddonTestUtils.checkMessages(messages, {
|
||||
expected: [
|
||||
{
|
||||
message: /Warning processing permissions: Error processing permissions.0: Value "declarativeNetRequest"/,
|
||||
},
|
||||
{
|
||||
message: /Warning processing permissions: Error processing permissions.1: Value "declarativeNetRequestFeedback"/,
|
||||
},
|
||||
{
|
||||
message: /Warning processing permissions: Error processing permissions.2: Value "declarativeNetRequestWithHostAccess"/,
|
||||
},
|
||||
],
|
||||
add_task(async function dnr_available_in_mv2() {
|
||||
await testAvailability({
|
||||
allowDNRFeedback: true,
|
||||
testExpectations: {
|
||||
declarativeNetRequest_available: true,
|
||||
testMatchOutcome_available: true,
|
||||
},
|
||||
manifest: {
|
||||
manifest_version: 2,
|
||||
permissions: [
|
||||
"declarativeNetRequest",
|
||||
"declarativeNetRequestFeedback",
|
||||
"declarativeNetRequestWithHostAccess",
|
||||
],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче