Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to allow `<all_urls>` optional permission #5054

Open
Manvel opened this issue Oct 19, 2019 · 2 comments
Open

How to allow `<all_urls>` optional permission #5054

Manvel opened this issue Oct 19, 2019 · 2 comments

Comments

@Manvel
Copy link

@Manvel Manvel commented Oct 19, 2019

I'm having trouble testing additional permission request of my extension.

The following is set as optional permission in the manifest.json file:

"optional_permissions": ["<all_urls>"],

And in the extension I do request and revoke the permission using:

chrome.permissions.request({"origins": ["<all_urls>"]}) // Request
chrome.permissions.remove({"origins": ["<all_urls>"]}); // Revoke

I would like to be able to test the extension behavior when permission is successfully requested and revoked, but there seem to be no way to fetch permission dialog event and accept, also it doesn't seem to be possible to do using browserContext.overridePermissions .

Any idea how that can be done?

@agomez0207

This comment has been minimized.

Copy link

@agomez0207 agomez0207 commented Jan 8, 2020

Hello, we had a similar problem, there is no way to fetch permission dialog event and accept because that dialog is not triggered by any JS on the page, is triggered by Chrome API

chrome.permissions.request

We used this library for nodejs in order to simulate tab and enter keys for allow/disallow the permission.

@guanbinrui

This comment has been minimized.

Copy link

@guanbinrui guanbinrui commented Mar 13, 2020

Hello, we had a similar problem, there is no way to fetch permission dialog event and accept because that dialog is not triggered by any JS on the page, is triggered by Chrome API

chrome.permissions.request

We used this library for nodejs in order to simulate tab and enter keys for allow/disallow the permission.

@agomez0207 The permission dialog looks cannot approve by the keyboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.