Closed Bug 1605403 Opened 4 years ago Closed 4 years ago

UserScriptOptions js property shouldn't be optional

Categories

(WebExtensions :: General, defect, P5)

defect

Tracking

(firefox75 fixed)

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: rpl, Assigned: atiqueahmedziad, Mentored)

References

Details

(Keywords: good-first-bug)

Attachments

(1 file, 1 obsolete file)

The js property is currently marked as optional in the API schema file, as it is in the RegisteredContentScriptOptions related to the contentScripts API.

For the contentScripts the js property is optional because an extension may register a CSS only contentScript, but it doesn't make much sense to register a userScript without any associated script and so it would make sense to make the js property mandatory for userScripts.register.

Mentor: lgreco
Keywords: good-first-bug
Priority: -- → P5

Hello Luca,

I want to work on it. I haven't worked on webExtension bugs earlier. Can you give me some instruction, how will I submit a patch for this bug ?

Thanks
Atique

(In reply to Atique Ahmed Ziad [:atiqueahmedziad] from comment #1)

Hello Luca,

I want to work on it. I haven't worked on webExtension bugs earlier. Can you give me some instruction, how will I submit a patch for this bug ?

Thanks
Atique

Hi Atique!
Some documentation on contributing to the WebExtensions API is available at https://wiki.mozilla.org/WebExtensions/Contribution_Onramp

Once your development environment setup is done, comment 0 includes a link to the part of the user_scripts.json API schema file relevant to this issue.

It would be good to also add a test case that covers the fix to the API JSON schema, by adding a new test case to the userScripts tests that verify that the js property is not optional and browser.userScripts.register fails as expected when called without it.

The main group of test cases related to the userScripts API is in the toolkit/components/extensions/test/xpcshell/test_ext_userScripts.js test file.

Blocks: 1595853
Assignee: nobody → softfilebd
Status: NEW → ASSIGNED
Attachment #9122951 - Attachment description: Bug 1605403 - update test case → Bug 1605403 - UserScriptOptions js property shouldn't be optional. r=rpl

Comment on attachment 9122941 [details]
Bug 1605403 - UserScriptOptions js property shouldn't be optional. r=rpl

Marking as obsolete (this patch is being abandoned in favor of D61002, which now includes the content originally split in the two phabricator revisions).

Attachment #9122941 - Attachment is obsolete: true
Attachment #9122941 - Attachment is obsolete: false
Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/80ae1b003c69
UserScriptOptions js property shouldn't be optional. r=rpl
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Attachment #9122941 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: