-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Remove oneRealm arg from set_permission #37152
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| [set_permission.https.html] | ||
| [Grant Permission for one realm] | ||
| [Grant Permission] | ||
| expected: | ||
| if product != "chrome": FAIL | ||
|
|
||
| [Deny Permission, omit one realm] | ||
| [Deny Permission] | ||
| expected: | ||
| if product != "chrome": FAIL | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,17 +1,23 @@ | ||
| <!DOCTYPE html> | ||
| <meta charset="utf-8"> | ||
| <meta charset="utf-8" /> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems unrelated?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, ran prettier over it… it adds the “ />” garbage. |
||
| <title>TestDriver set_permission method</title> | ||
| <script src="/resources/testharness.js"></script> | ||
| <script src="/resources/testharnessreport.js"></script> | ||
| <script src="/resources/testdriver.js"></script> | ||
| <script src="/resources/testdriver-vendor.js"></script> | ||
|
|
||
| <script> | ||
| promise_test(t => { | ||
| return test_driver.set_permission({name: "ambient-light-sensor"}, "granted", true); | ||
| }, "Grant Permission for one realm"); | ||
| const descriptor = { name: "geolocation" }; | ||
|
|
||
| promise_test(t => { | ||
| return test_driver.set_permission({name: "push", userVisibleOnly: true}, "denied"); | ||
| }, "Deny Permission, omit one realm"); | ||
| promise_test(async (t) => { | ||
| await test_driver.set_permission(descriptor, "granted"); | ||
| permission = await navigator.permissions.query(descriptor); | ||
| assert_equals(permission.state, "granted"); | ||
| }, "Grant Permission"); | ||
|
|
||
| promise_test(async (t) => { | ||
| await test_driver.set_permission(descriptor, "denied"); | ||
| permission = await navigator.permissions.query(descriptor); | ||
| assert_equals(permission.state, "denied"); | ||
| }, "Deny Permission"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we really be changing this entire test as part of this?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case, yes. It doesn’t do any harm to test that setting the permission worked. |
||
| </script> | ||
Uh oh!
There was an error while loading. Please reload this page.