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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add durableStorage to allowed permissions #5295
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 馃摑 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
鈩癸笍 Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! 鈩癸笍 Googlers: Go here for more info. |
03a4ca1
to
d4b17bd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mushishi78 Thanks for your contribution! Could you add the new permission to the documentation and maybe also find a way to add a test for this? Happy to get this landed :)
@jschfflr added to docs and test. It's a bit low effort copy and paste, but possibly good enough? 馃 |
e65f193
to
bb4e267
Compare
@jschfflr And now rebased on main |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks!
Looks good enough to me, thanks! |
Seems like the test failed on CI 馃槥 |
It looks like |
@mushishi78 I just tried to write a test for this usecase: itFailsFirefox('should grant durable-storage', async () => {
const { page, server, context } = getTestState();
function checkIfIndexedDBIsAvailable() {
const request = window.indexedDB.open("MyTestDatabase", 1);
return new Promise((resolve, reject) => {
request.onsuccess = () => resolve(true);
request.onerror = (err) => reject(err);
});
}
await context.clearPermissionOverrides();
await page.goto(server.EMPTY_PAGE);
expect(await page.evaluate(checkIfIndexedDBIsAvailable)).toBe(false);
await context.overridePermissions(server.EMPTY_PAGE, ['durable-storage']);
expect(await page.evaluate(checkIfIndexedDBIsAvailable)).toBe(true);
await context.clearPermissionOverrides();
}); but it looks like the |
Thanks @jschfflr. The problem for me is only when not in headless if that helps. Whenever I debug my tests I have to manually press accept on the permission. |
@mushishi78 Could you share the code that you are running? Or a minimal reproduction? |
That's frustrating. I'm going on holiday until next monday, so won't have time to until sometime next week unfortuneately. Thanks for your help. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the 鈩癸笍 Googlers: Go here for more info. |
I took a look at this change again and the underlying permissions. It looks like Regarding the
Have a great time off! Let me know if you're happy with the change as it is now and I'll get it merged :) |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the 鈩癸笍 Googlers: Go here for more info. |
@googlebot I consent. |
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the 鈩癸笍 Googlers: Go here for more info. |
Please tell me if I've got the wrong end of the stick, I'm totally operating under guess work. I'd like to be able to use indexeddb. I've found "durableStorage" [here](https://chromium-review.googlesource.com/c/chromium/src/+/1185877/4/content/browser/devtools/protocol/browser_handler.cc#120). I can also see it in the dart puppeteer: https://pub.dev/documentation/puppeteer/latest/protocol_browser/PermissionType-class.html (along with a bunch of others). So I was hoping it was as simple as just adding to this list.
CLAs look good, thanks! 鈩癸笍 Googlers: Go here for more info. |
CLAs look good, thanks! 鈩癸笍 Googlers: Go here for more info. |
Please tell me if I've got the wrong end of the stick, I'm totally operating under guess work. I'd like to be able to use indexeddb. I've found "durableStorage" here.
I can also see it in the dart puppeteer docs (along with a bunch of others).
So I was hoping it was as simple as just adding to this list 馃