Skip to content

Commit

Permalink
New 'protocol-handler' PermissionDescriptor for the setPermission API
Browse files Browse the repository at this point in the history
The idea of this CL is to define a new mapping between blinks's PermissionType enum and the PermissionDescriptor structure defined in by the Permission [1] interface.

The new mapping will be useful to provide permission automation for the
testing of the CustomHandler HTML API [2]. There is an ongoing discussion with the WPT community in the issue #26819 [3], where it seems to be enough agreement on the idea of using the WebDriver setPermission API to grant or deny permission for the registerProtocolHandler method, avoiding the user interaction.

This CL tries to cover all the end points of the Permission interface,
either the InternalPermission class or through the CRDTP.

[1] https://w3c.github.io/permissions/#permissions-interface
[2] https://html.spec.whatwg.org/multipage/system-state.html#custom-handlers
[3] #26819

Bug: 1321073

Change-Id: I289bc89bd1be31b18fd91ed3d81c6dd5fe853a0c
  • Loading branch information
javifernandez authored and chromium-wpt-export-bot committed May 11, 2022
1 parent 00f9369 commit 68bd420
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions infrastructure/testdriver/set_permission.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@
promise_test(t => {
return test_driver.set_permission({name: "push", userVisibleOnly: true}, "denied");
}, "Deny Permission, omit one realm");

promise_test(t => {
return test_driver.set_permission({name: "protocol-handler"}, "granted", true);
}, "Grant Permission for 'protocol-handler' operations");
</script>

0 comments on commit 68bd420

Please sign in to comment.