For the purposes of user-agent automation and application testing, this document defines
- extensions to the [[WebDriver]] and [[WebDriver-BiDi]] specifications.
- It is OPTIONAL for a user agent to support them.
+ extensions to the [[WebDriver]] and [[WebDriver-BiDi]] specifications. It is OPTIONAL for a
+ user agent to support them.
- To set a permission given a {{PermissionDescriptor}} |descriptor:PermissionDescriptor|, and a {{PermissionState}} |state:PermissionState|:
+ To set a permission given a {{PermissionDescriptor}}
+ |descriptor:PermissionDescriptor|, and a {{PermissionState}} |state:PermissionState|:
-
Let |settings| be the [=current settings object=].
-
Let |targets| be a list containing all [=environment settings objects=]
- whose [=environment settings object/origin=] is [=same origin=] as
- the [=environment settings object/origin=] of |settings|.
+
Let |settings| be the [=current settings object=].
+
+
Let |targets| be a list containing all [=environment settings objects=] whose
+ [=environment settings object/origin=] is [=same origin=] as the [=environment settings
+ object/origin=] of |settings|.
+
For each [=environment settings object=] |target| in |targets|:
[=Queue a task=] |task| on the [=permissions task source=] of |target|'s
[=relevant settings object=]'s [=environment settings object/global object=]'s
[=Window/browsing context=] to perform the following step:
-
Interpret |state| as if it were the
- result of an invocation of [=permission state=] for |descriptor| with the
- argument |target| made at this moment.
+
Interpret |state| as if it were the result of an invocation of [=permission
+ state=] for |descriptor| with the argument |target| made at this moment.
-
[=list/Append=] |task| to |tasks|.
+
[=list/Append=] |task| to |tasks|.
+
-
Wait for all tasks in |tasks| to have executed and return.
+
Wait for all tasks in |tasks| to have executed and return.
+
@@ -1263,7 +1267,8 @@
Automated testing with [[WebDriver]]
- This document defines the following extension commands for the [[WebDriver]] specification.
+ This document defines the following extension commands for the [[WebDriver]]
+ specification.
@@ -1305,7 +1310,8 @@
Let |rootDesc| be |parameters|.{{PermissionSetParameters/descriptor}}.
If |parameters|.{{PermissionSetParameters/state}} is an inappropriate permission
- state for any implementation-defined reason, return a [=invalid argument=] [=error=].
+ 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
@@ -1313,12 +1319,12 @@
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=].
+ value of |rootDesc|.{{PermissionDescriptor/name}}'s [=powerful feature/permission
+ descriptor type=]. If this throws an exception, return a [=invalid argument=]
+ [=error=].
-
- [=Set a permission=] with |typedDescriptor| and |parameters|.{{PermissionSetParameters/state}}.
+
[=Set a permission=] with |typedDescriptor| and
+ |parameters|.{{PermissionSetParameters/state}}.