Closed Bug 1279392 Opened 8 years ago Closed 8 years ago

Move API permission definitions to the schemas

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox50 fixed)

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: kmag, Assigned: kmag)

References

Details

Attachments

(1 file)

      No description provided.
Blocks: 1263011
Comment on attachment 8761915 [details]
Bug 1279392: [webext] Move API permission definitions to the schemas.

https://reviewboard.mozilla.org/r/58930/#review56134

nice!
Can we remove `registerPrivilegedAPI()` now too

::: toolkit/components/extensions/test/xpcshell/test_ext_schemas.js:1074
(Diff revision 1)
>                  /not contain the unexpected properties \[foo, quux\], or be an array value/);
>  });
> +
> +
> +let permissionsJson = [
> +  {namespace: "noPerms",

the intendation here is strange but as long as eslint doesn't seem to care, its not a big deal.
Attachment #8761915 - Flags: review?(aswan) → review+
https://reviewboard.mozilla.org/r/58930/#review56134

Probably. I can't think of anywhere we'll need it again.
https://reviewboard.mozilla.org/r/58930/#review56134

> the intendation here is strange but as long as eslint doesn't seem to care, its not a big deal.

Yeah, it is a bit strange. I decided copy the formatting from the other definitions, and ESLint doesn't mind.
(In reply to Andrew Swan [:aswan] from comment #2)
> Can we remove `registerPrivilegedAPI()` now too

I'm going to file a follow-up for this, since I think there's some other
support code we can remove along with it.
https://hg.mozilla.org/integration/fx-team/rev/a00cf073f5c00380d4e42b13bc0cd3146b708845
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
Backed out for failing mochitest test_ext_contentscript_create_iframe.html at least on Linux x64 opt:

https://hg.mozilla.org/integration/fx-team/rev/4eb7afe97b2b470c9276a8af9c23910cdbd02563

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=fx-team&revision=a00cf073f5c00380d4e42b13bc0cd3146b708845
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=9968479&repo=fx-team
11:09:49     INFO -  86 INFO TEST-START | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html
11:09:50     INFO -  TEST-INFO | started process screentopng
11:09:51     INFO -  TEST-INFO | screentopng: exit 0
11:09:51     INFO -  87 INFO SpawnTask.js | Entering test test_contentscript_create_iframe
11:09:51     INFO -  88 INFO Extension loaded
11:09:51     INFO -  89 INFO extension loaded
11:09:51     INFO -  90 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html | the created iframe should not be able to use privileged APIs (tabs)
11:09:51     INFO -      testHandler@SimpleTest/ExtensionTestUtils.js:61:7
11:09:51     INFO -      testResult@SimpleTest/ExtensionTestUtils.js:71:36
11:09:51     INFO -  Not taking screenshot here: see the one that was previously logged
11:09:51     INFO -  91 INFO TEST-UNEXPECTED-FAIL | toolkit/components/extensions/test/mochitest/test_ext_contentscript_create_iframe.html | the created iframe should not be able to use privileged APIs (windows)
11:09:51     INFO -      testHandler@SimpleTest/ExtensionTestUtils.js:61:7
11:09:51     INFO -      testResult@SimpleTest/ExtensionTestUtils.js:71:36
Flags: needinfo?(kmaglione+bmo)
https://hg.mozilla.org/integration/fx-team/rev/5003caf3aa25dad509e53c68d2ee39de58fe5ec5
Bug 1279392: [webext] Move API permission definitions to the schemas. r=aswan
Flags: needinfo?(kmaglione+bmo)
https://hg.mozilla.org/mozilla-central/rev/5003caf3aa25
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: