Closed Bug 1253645 Opened 8 years ago Closed 8 years ago

Implement browser.extension.isAllowedIncognitoAccess

Categories

(WebExtensions :: Untriaged, defect)

defect
Not set
normal

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: andy+bugzilla, Assigned: cgrebs, Mentored)

References

Details

(Keywords: dev-doc-complete, Whiteboard: [extension][good first bug][berlin])

Attachments

(1 file)

For the moment, this can just be a stub that returns `true`, since we currently allow incognito access to all extensions.
Mentor: kmaglione+bmo
Summary: Implement chrome.extension.isAllowedIncognitoAccess → Implement browser.extension.isAllowedIncognitoAccess
Whiteboard: [extension][good first bug][berlin]
Hello,

I would like to work on this bug. Can you please give me some hint since this is my first bug?
Flags: needinfo?(kmaglione+bmo)
Assignee: nobody → cgrebs
Status: NEW → ASSIGNED
Comment on attachment 8730152 [details]
MozReview Request: Bug 1253645 - Implement browser.extension.isAllowedIncognitoAccess, r?kmag

https://reviewboard.mozilla.org/r/39711/#review36337

::: toolkit/components/extensions/test/mochitest/test_ext_extension.html:19
(Diff revision 1)
> +"use strict";
> +
> +add_task(function* test_is_allowed_incognito_access() {
> +  function backgroundScript() {
> +    browser.extension.isAllowedIncognitoAccess().then(isAllowedIncognitoAccess => {
> +      browser.test.assertTrue(isAllowedIncognitoAccess, `isAllowedIncognitoAccess is true`);

Please use `assertEq(true, isAllowedIncognitoAccess, ...)` instead, since we want to test against the exact value `true`, rather than just a value which evaluates as true.

::: toolkit/components/extensions/test/mochitest/test_ext_extension.html:20
(Diff revision 1)
> +
> +add_task(function* test_is_allowed_incognito_access() {
> +  function backgroundScript() {
> +    browser.extension.isAllowedIncognitoAccess().then(isAllowedIncognitoAccess => {
> +      browser.test.assertTrue(isAllowedIncognitoAccess, `isAllowedIncognitoAccess is true`);
> +      browser.test.notifyPass("ready");

Please use a more specific name for the result than "pass", like "isAllowedIncognitoAccess"
Attachment #8730152 - Flags: review?(kmaglione+bmo) → review+
Comment on attachment 8730152 [details]
MozReview Request: Bug 1253645 - Implement browser.extension.isAllowedIncognitoAccess, r?kmag

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/39711/diff/1-2/
Whiteboard: [extension][good first bug][berlin] → [extension][good first bug][berlin][checkin-needed]
Keywords: checkin-needed
Whiteboard: [extension][good first bug][berlin][checkin-needed] → [extension][good first bug][berlin]
Flags: needinfo?(kmaglione+bmo)
Pushed a follow-up which adds a semicolon at the end of a single statement function so eslint stops complaining:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc205e345b60
https://hg.mozilla.org/mozilla-central/rev/a689a66e9e8e
https://hg.mozilla.org/mozilla-central/rev/fc205e345b60
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.