From 989bdb85fc6207df58da7745f503e215ced7a8e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcos=20C=C3=A1ceres?=
permission=] or by some user agent policy.
- Automated testing of this specification is performed using the API provided by the Permissions Automation document. + For the purposes of user-agent automation and application testing, this document defines + the following extension commands for the [[WebDriver]] specification.
++ dictionary PermissionSetParameters { + required PermissionDescriptor descriptor; + required PermissionState state; + boolean oneRealm = false; + }; ++
+ HTTP Method + | ++ URI Template + | +
---|---|
+ POST + | ++ /session/{session id}/permissions + | +
+ The Set Permission extension command simulates user modification of a + {{PermissionDescriptor}}'s permission state. +
++ The remote end steps are: +
+|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
+ feature/permission descriptor type=]. If this throws an exception, return a WebDriver
+ error with WebDriver error code WebDriver invalid argument.
+ + For example, user agents that define the "midi" powerful feature as + "always on" may choose to reject command to set the permission state to + {{PermissionState/"denied"}} at this step. +
+|rootDesc|.{{PermissionDescriptor/name}}
isn't allowed in [=non-secure
+ context=], return a WebDriver error with WebDriver error code WebDriver
+ invalid argument.
+ For the purposes of user-agent automation and application testing, this document defines - the following extension commands for the [[WebDriver]] specification. + the following extension commands for the [[WebDriver]] specification. It is OPTIONAL + for a user agent to support extension commands commands.
dictionary PermissionSetParameters { @@ -951,19 +952,18 @@
-
- Let |parameters| be the |parameters| argument, converted to an IDL value of - type {{PermissionSetParameters}}. If this throws an exception, return a WebDriver - error with WebDriver error code WebDriver invalid argument. + type {{PermissionSetParameters}}. If this throws an exception, return a [=invalid + argument=] [=error=].
- Let |rootDesc| be |parameters|.{{PermissionSetParameters/descriptor}}.
- 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 WebDriver - error with WebDriver error code WebDriver invalid argument. + feature/permission descriptor type=]. If this throws an exception, return a [=invalid + argument=] [=error=].- If |parameters|.{{PermissionSetParameters/state}} is an inappropriate permission - state for any implementation-defined reason, return a WebDriver error with - WebDriver error code WebDriver invalid argument. + state for any implementation-defined reason, return a [=invalid argument=] [=error=].
For example, user agents that define the "midi" powerful feature as "always on" may choose to reject command to set the permission state to @@ -972,11 +972,6 @@
- Let |settings| be the [=current settings object=].
-- If |settings| is a non-secure context and -
|rootDesc|.{{PermissionDescriptor/name}}
isn't allowed in [=non-secure - context=], return a WebDriver error with WebDriver error code WebDriver - invalid argument. -- If |parameters|.{{PermissionSetParameters/oneRealm}} is true, let |targets| be a list whose sole member is |settings|.
@@ -1008,11 +1003,11 @@
- Return success with data `null`.