Closed Bug 1518486 Opened 6 years ago Closed 6 years ago

Disable extension devtools_page for private tabs when not allowed by users

Categories

(WebExtensions :: Developer Tools, enhancement, P1)

enhancement

Tracking

(firefox67 verified)

VERIFIED FIXED
mozilla67
Iteration:
66.3 - Jan 7 - 20
Tracking Status
firefox67 --- verified

People

(Reporter: rpl, Assigned: rpl)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

The devtools_page is the invisible extension page that is created for the devtools toolbox related to local tabs, and it is the entrypoint for any usage of the devtools APIs (as the entire devtools API namespace is never available in non-devtools extension pages).

If the tab related to the toolbox is a private tab, the extensions devtools_page should only be created for extensions that are allowed to access private browsing windows.

Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Iteration: --- → 66.3 - Jan 7 - 20
Priority: -- → P1
This patch moves some "devtools related" test helpers into a shared support file, and updates all the existing devtools API mochitests to use the new shared test helpers. This change has also the following nice side-effects: - remove any usage of the custom devtools module loader from the webextensions mochitests. - use a custom "test blank toolbox panel" in all the devtools API tests that doesn't need a specific panel to be selected (which should help to make the test able to run a bit faster because none of the more expensive devtools panels is going to be loaded during the tests if not actually needed).
This patch applies the following changes: - make sure that the WebExtensions internals do not create any devtools_page related to a private tabs' toolbox if the extension is not allowed to access the private browsing windows - define a new mochitest to verify the expended behaviors on the private windows when the extension is allowed and not allowed Depends on D15948
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/f5b40e3836f1 Move extension "devtools related" test helpers into a shared head_devtools.js support file. r=mixedpuppy https://hg.mozilla.org/integration/autoland/rev/c63e693b1ce2 Disable extension devtools_page for private tabs when not allowed by users. r=mixedpuppy https://hg.mozilla.org/integration/autoland/rev/5781d37b8a3b Reuse shared loadTestSubscript test helper in other extensions mochitest-browser test files. r=mixedpuppy
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Attached image Bug1518486.gif (deleted) —

This issue is verified as fixed on Firefox 67.0a1(20190204214259) under Win 7 64-bit and Mac OS X 10.14.1.

Please see the attached video.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: