Closed
Bug 1317000
Opened 9 years ago
Closed 9 years ago
Display permissions prompt for webextensions installed locally from about:addons
Categories
(Toolkit :: Add-ons Manager, defect, P1)
Tracking
()
VERIFIED
FIXED
mozilla54
| Tracking | Status | |
|---|---|---|
| firefox54 | --- | verified |
People
(Reporter: aswan, Assigned: aswan)
References
Details
(Whiteboard: triaged)
Attachments
(2 files)
The specified flow for local installs is similar to that from web sites, this bug covers implementing that flow for installation from about:addons (either by choosing "Install Add-on from File..." from the gear menu or by dragging and dropping an xpi file onto about:addons)
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → aswan
Priority: -- → P1
Whiteboard: triaged
Comment 1•9 years ago
|
||
UI
| Comment hidden (mozreview-request) |
| Assignee | ||
Updated•9 years ago
|
Attachment #8833162 -
Flags: review?(dtownsend)
Comment 3•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8833162 [details]
bug 1317000 Test for permission prompts on local file installs
https://reviewboard.mozilla.org/r/109398/#review110694
Mostly there but there are a few things that I think can be cleaned up here.
::: browser/base/content/test/general/browser_extension_permissions.js:70
(Diff revision 1)
> +// that resolves when the page is loaded.
> +function load(url) {
> + let contentWin = gBrowser.selectedTab.linkedBrowser.contentWindow;
> + let promise = new Promise(resolve => {
> + gBrowser.addEventListener("DOMContentLoaded", resolve, {once: true});
> + });
Please use BrowserTestUtils.browserLoaded
::: browser/base/content/test/general/browser_extension_permissions.js:71
(Diff revision 1)
> +function load(url) {
> + let contentWin = gBrowser.selectedTab.linkedBrowser.contentWindow;
> + let promise = new Promise(resolve => {
> + gBrowser.addEventListener("DOMContentLoaded", resolve, {once: true});
> + });
> + contentWin.location.href = INSTALL_PAGE;
Please use gBrowser.selectedBrowser.loadURI
::: browser/base/content/test/general/browser_extension_permissions.js:115
(Diff revision 1)
> + };
> + Services.obs.addObserver(listener, "EM-loaded", false);
> + });
> +
> + let contentWin = gBrowser.selectedTab.linkedBrowser.contentWindow;
> + contentWin.location.href = "about:addons";
Please use gBrowser.selectedBrowser.loadURI, it guarantees you won't be using a CPOW.
Alternativly can you just use BrowserOpenAddonsMgr which handles waiting for the load to complete already and lets you choose the initial view?
Attachment #8833162 -
Flags: review?(dtownsend) → review-
| Assignee | ||
Comment 4•9 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8833162 [details]
bug 1317000 Test for permission prompts on local file installs
https://reviewboard.mozilla.org/r/109398/#review110694
> Please use gBrowser.selectedBrowser.loadURI, it guarantees you won't be using a CPOW.
>
> Alternativly can you just use BrowserOpenAddonsMgr which handles waiting for the load to complete already and lets you choose the initial view?
wow, how did i get this far without ever coming across BrowserOpenAddonsMgr before?
| Comment hidden (mozreview-request) |
Comment 6•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8833162 [details]
bug 1317000 Test for permission prompts on local file installs
https://reviewboard.mozilla.org/r/109398/#review110750
Well that became simpler!
Attachment #8833162 -
Flags: review?(dtownsend) → review+
| Comment hidden (mozreview-request) |
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b46165a0e3d6
Test for permission prompts on local file installs r=mossop
Comment 9•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Comment 10•9 years ago
|
||
Verified fixed on Firefox 54.0a1 (2017-02-19) under Windows 10 64-bit and Ubuntu 16.04 32-bit.
Permissions doorhanger is successfully displayed while installing locally via about:addons: https://www.screencast.com/t/5ivxUhr7n
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•