diff --git a/index.html b/index.html index 6fbe783..51ace68 100644 --- a/index.html +++ b/index.html @@ -310,7 +310,7 @@

[=permission store entry/descriptor=] is |descriptor|, and whose [=permission store entry/key=] [=permission key/is equal to=] |key| given |descriptor|, return that entry. -
  • Return null. +
  • Return `null`.
  • @@ -510,8 +510,8 @@

    +

    + The remote end steps are: +

    +
      +
    1. Let |parameters| be the |parameters| argument, converted to an IDL value of + type {{PermissionSetParameters}}. If this throws an exception, return an [=invalid + argument=] [=error=]. +
    2. +
    3. Let |rootDesc| be |parameters|.{{PermissionSetParameters/descriptor}}. +
    4. +
    5. If |parameters|.{{PermissionSetParameters/state}} is an inappropriate permission + state for any implementation-defined reason, return a [=invalid argument=] [=error=]. +

      + For example, user agents that define the "midi" powerful feature as + "always on" can choose to reject a command to set the permission state to + {{PermissionState/"denied"}} at this step. +

      +
    6. +
    7. Let |typedDescriptor| be the object |rootDesc| refers to, converted to an IDL + value of |rootDesc|.{{PermissionDescriptor/name}}'s [=powerful + feature/permission descriptor type=]. If this throws an exception, return a [=invalid + argument=] [=error=]. +
    8. +
    9. + [=Set a permission=] with |typedDescriptor| and |parameters|.{{PermissionSetParameters/state}}. +
    10. +
    11. Return success with data `null`. +
    12. +
    + + + +
    +

    + Automated testing with [[WebDriver-BiDi]] +

    +

    + This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification. +

    +
    +

    + The permissions Module +

    +

    + The permissions module contains commands for + managing the remote end browser permissions. +

    +
    +
    + Definition +
    +

    + [=remote end definition=] +

    +
    +              PermissionsCommand = (
    +                permissions.setPermission
    +              )
    +            
    +
    +
    +
    + Types +
    +
    +
    + The permissions.PermissionDescriptor Type +
    +
    +                permissions.PermissionDescriptor = {
    +                  name: text,
    +                }
    +              
    +

    + The `permissions.PermissionDescriptor` type represents a {{PermissionDescriptor}}. +

    +
    +
    +
    + The permissions.PermissionState Type +
    +
    +                permissions.PermissionState = "granted" / "denied" / "prompt"
    +              
    +

    + The `permissions.PermissionState` type represents a {{PermissionState}}. +

    +
    +
    +
    +
    + Commands +
    +
    +
    + The permissions.setPermission Command +
    +

    + The Set Permission + [=command=] simulates user modification of a {{PermissionDescriptor}}'s + [=permission state=]. +

    +
    +
    Command Type
    +
    +
    +                    permissions.setPermission = (
    +                      method: "permissions.setPermission",
    +                      params: permissions.SetPermissionParameters
    +                    )
    +
    +                    permissions.SetPermissionParameters = {
    +                      descriptor: permissions.PermissionDescriptor,
    +                      state: permissions.PermissionState,
    +                    }
    +                  
    +
    +
    Result Type
    +
    +
    +                    EmptyResult
    +                  
    +
    +
    +
    +

    + The [=remote end steps=] with |session| and |command parameters| are: +

    +
      +
    1. + Let |descriptor| be the value of the `descriptor` field of + |command parameters|. +
    2. +
    3. + Let |permission name| be the value of the `name` field of + |descriptor| representing {{PermissionDescriptor/name}}. +
    4. +
    5. + Let |state| be the value of the `state` field of |command + parameters|. +
    6. +
    7. + If |state| is an inappropriate [=permission state=] for any + implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=]. +
    8. +
    9. + Let |typedDescriptor| be the object |descriptor| refers to, [=converted to an IDL value=] (|descriptor|, |state|) of + {{PermissionSetParameters}} |permission name|'s [=powerful feature/permission descriptor type=]. + If this conversion throws an exception, return [=error=] with [=error code=] [=invalid argument=]. +
    10. +
    11. [=Set a permission=] with |typedDescriptor| and |state|.
    12. +
    13. Return [=success=] with data `null`.
    14. +
    + +
    +
    +