Skip to content

Commit

Permalink
Remove MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS rule (#5342)
Browse files Browse the repository at this point in the history
  • Loading branch information
willdurand committed Jun 14, 2024
1 parent 625435c commit e3892dc
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 59 deletions.
5 changes: 0 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,11 +584,6 @@ <h2 id="web-extensions-%2F-manifest.json" tabindex="-1">Web Extensions / manifes
<td>The version string is not valid because its format is too complex.</td>
</tr>
<tr>
<td><code>MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS</code></td>
<td>warning</td>
<td>The extension is marked as compatible with a Firefox for Android version that doesn't fully support Manifest Version 3</td>
</tr>
<tr>
<td><code>INCOGNITO_SPLIT_UNSUPPORTED</code></td>
<td>warning</td>
<td>The incognito &quot;split&quot; value is unsupported in Firefox</td>
Expand Down
1 change: 0 additions & 1 deletion docs/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ Rules are sorted by severity.
| `APPLICATIONS_INVALID` | error | The `applications` property is no longer accepted in Manifest Version 3 and above |
| `VERSION_FORMAT_DEPRECATED` | warning | The version string should be simplified |
| `VERSION_FORMAT_INVALID` | error | The version string is not valid because its format is too complex. |
| `MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS` | warning | The extension is marked as compatible with a Firefox for Android version that doesn't fully support Manifest Version 3 |
| `INCOGNITO_SPLIT_UNSUPPORTED` | warning | The incognito "split" value is unsupported in Firefox |
| `ADMIN_INSTALL_ONLY_PROP_RESERVED` | error | The `browser_specific_settings.gecko.admin_install_only` property is reserved and can only be used in enterprise add-ons |
| `ADMIN_INSTALL_ONLY_REQUIRED` | error | The `browser_specific_settings.gecko.admin_install_only` property must be set to "true" in an enterprise add-on |
Expand Down
13 changes: 0 additions & 13 deletions src/messages/manifestjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ export const MANIFEST_FIELD_INVALID = {
file: MANIFEST_JSON,
};

export const MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS = {
code: 'MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS',
message: i18n._(
'Manifest Version 3 is not fully supported on Firefox for Android.'
),
// TODO(#5110): replace description with a message including a shorted
// link to a documentation page.
description: i18n._(
'Manifest Version 3 is not fully supported on Firefox for Android.'
),
file: MANIFEST_JSON,
};

export const MANIFEST_FIELD_PRIVILEGEDONLY = 'MANIFEST_FIELD_PRIVILEGEDONLY';
export function manifestFieldPrivilegedOnly(fieldName) {
return {
Expand Down
9 changes: 0 additions & 9 deletions src/parsers/manifestjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,6 @@ export default class ManifestJSONParser extends JSONParser {
this.isValid = false;
}

if (
this.parsedJSON.manifest_version >= 3 &&
this.parsedJSON.browser_specific_settings?.gecko_android
) {
this.collector.addWarning(
messages.MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS
);
}

if (this.parsedJSON.content_security_policy != null) {
this.validateCspPolicy(this.parsedJSON.content_security_policy);
}
Expand Down
31 changes: 0 additions & 31 deletions tests/unit/parsers/test.manifestjson.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,28 +365,6 @@ describe('ManifestJSONParser', () => {
expect(manifestJSONParser.isValid).toEqual(true);
});

it('should warn when gecko_android is set along with manifest_version 3', () => {
const addonLinter = new Linter({ _: ['bar'] });
const json = validManifestJSON({
browser_specific_settings: {
gecko: { id: 'test@ext' },
gecko_android: {},
},
manifest_version: 3,
});

const manifestJSONParser = new ManifestJSONParser(
json,
addonLinter.collector
);

const { warnings } = addonLinter.collector;
expect(warnings).toEqual([
expect.objectContaining(messages.MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS),
]);
expect(manifestJSONParser.isValid).toEqual(true);
});

describe('browser_style', () => {
function parseManifest(manifestVersion, manifestKey, browserStyleValue) {
const manifest = {
Expand Down Expand Up @@ -5546,15 +5524,6 @@ describe('ManifestJSONParser', () => {
expect(linter.collector.warnings).toEqual([
expect.objectContaining(messages.APPLICATIONS_DEPRECATED),
]);
} else if (
manifestProps.manifest_version === 3 &&
manifestProps?.browser_specific_settings?.gecko_android
) {
expect(linter.collector.warnings).toEqual([
expect.objectContaining(
messages.MANIFEST_V3_FIREFOX_ANDROID_LIMITATIONS
),
]);
} else {
expect(linter.collector.warnings).toEqual([]);
}
Expand Down

0 comments on commit e3892dc

Please sign in to comment.