From 37f978103677f1fc0605729e61979730d39d3739 Mon Sep 17 00:00:00 2001
From: Thiago Perrotta
permission=] or by some user agent policy.
For the purposes of user-agent automation and application testing, this document defines - the following extension commands for the [[WebDriver]] specification. It is OPTIONAL - for a user agent to support extension commands commands. + extensions to the [[WebDriver]] and [[WebDriver-BiDi]] specifications. + It is OPTIONAL for a user agent to support them.
dictionary PermissionSetParameters { @@ -1192,104 +1192,290 @@-required PermissionState state; };
- HTTP Method - | -- URI Template - | -
---|---|
- POST - | -- /session/{session id}/permissions - | -
- The Set Permission - extension command simulates user modification of a {{PermissionDescriptor}}'s - permission state. + This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification.
++ The [=modules/browser=] module contains commands for + managing the remote end browser process. +
++ [=remote end definition=] +
++ BrowserCommand = ( + browser.setPermission + ) ++
+ browser.PermissionDescriptor = { + type: "permissionDescriptor", + name: text, + } ++
+ The browser.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+
+ browser.PermissionState = "granted" / "denied" / "prompt" ++
+ The browser.PermissionState
type represents a {{PermissionState}}.
+
+ The Set Permission + [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s + [=permission state=]. +
++ browser.setPermission = ( + method: "browser.setPermission", + params: browser.SetPermissionParameters + ) + + browser.SetPermissionParameters = { + descriptor: browser.PermissionDescriptor, + state: browser.PermissionState, + ? context: browsingContext.BrowsingContext, + ? origin: text, + } ++
+ EmptyResult ++
+ The [=remote end steps=] with |session| and |command parameters| are: +
+descriptor
field of
+ |command parameters|.
+ state
field of |command
+ parameters|.
+ context
field of
+ |command parameters|.
+ name
field of
+ |descriptor| representing {{PermissionDescriptor/name}}.
+ - The remote end steps are: + This document defines the following extension commands for the [[WebDriver]] specification.
-|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
- feature/permission descriptor type=]. If this throws an exception, return a [=invalid
- argument=] [=error=].
- - For example, user agents that define the "midi" powerful feature as - "always on" may choose to reject a command to set the permission state to - {{PermissionState/"denied"}} at this step. -
-+ The remote end steps are: +
+|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
+ feature/permission descriptor type=]. If this throws an exception, return a [=invalid
+ argument=] [=error=].
+ + For example, user agents that define the "midi" powerful feature as + "always on" may choose to reject a command to set the permission state to + {{PermissionState/"denied"}} at this step. +
+- This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification. -
-- The [=modules/browser=] module contains commands for - managing the remote end browser process. -
-- [=remote end definition=] -
-- BrowserCommand = ( - browser.setPermission - ) --
- browser.PermissionDescriptor = { - type: "permissionDescriptor", - name: text, - } --
- The browser.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
-
- browser.PermissionState = "granted" / "denied" / "prompt" --
- The browser.PermissionState
type represents a {{PermissionState}}.
-
- The Set Permission - [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s - [=permission state=]. -
-- browser.setPermission = ( - method: "browser.setPermission", - params: browser.SetPermissionParameters - ) - - browser.SetPermissionParameters = { - descriptor: browser.PermissionDescriptor, - state: browser.PermissionState, - ? context: browsingContext.BrowsingContext, - ? origin: text, - } --
- EmptyResult --
- The [=remote end steps=] with |session| and |command parameters| are: -
-descriptor
field of
- |command parameters|.
- state
field of |command
- parameters|.
- context
field of
- |command parameters|.
- name
field of
- |descriptor| representing {{PermissionDescriptor/name}}.
- + This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification. +
++ The [=modules/browser=] module contains commands for + managing the remote end browser process. +
++ [=remote end definition=] +
++ BrowserCommand = ( + browser.setPermission + ) ++
+ browser.PermissionDescriptor = { + type: "permissionDescriptor", + name: text, + } ++
+ The browser.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+
+ browser.PermissionState = "granted" / "denied" / "prompt" ++
+ The browser.PermissionState
type represents a {{PermissionState}}.
+
+ The Set Permission + [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s + [=permission state=]. +
++ browser.setPermission = ( + method: "browser.setPermission", + params: browser.SetPermissionParameters + ) + + browser.SetPermissionParameters = { + descriptor: browser.PermissionDescriptor, + state: browser.PermissionState, + ? context: browsingContext.BrowsingContext, + ? origin: text, + } ++
+ EmptyResult ++
+ The [=remote end steps=] with |session| and |command parameters| are: +
+descriptor
field of
+ |command parameters|.
+ state
field of |command
+ parameters|.
+ context
field of
+ |command parameters|.
+ name
field of
+ |descriptor| representing {{PermissionDescriptor/name}}.
+ - The [=modules/browser=] module contains commands for - managing the remote end browser process. + The permissions module contains commands for + managing the remote end browser permissions.
[=remote end definition=]
- BrowserCommand = ( - browser.setPermission + PermissionsCommand = ( + permissions.setPermission )
- browser.PermissionDescriptor = { + permissions.PermissionDescriptor = { type: "permissionDescriptor", name: text, }
- The browser.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+ The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
- browser.PermissionState = "granted" / "denied" / "prompt" + permissions.PermissionState = "granted" / "denied" / "prompt"
- The browser.PermissionState
type represents a {{PermissionState}}.
+ The permissions.PermissionState
type represents a {{PermissionState}}.
The Set Permission @@ -1375,14 +1375,14 @@
- browser.setPermission = ( - method: "browser.setPermission", - params: browser.SetPermissionParameters + permissions.setPermission = ( + method: "permissions.setPermission", + params: permissions.SetPermissionParameters ) - browser.SetPermissionParameters = { - descriptor: browser.PermissionDescriptor, - state: browser.PermissionState, + permissions.SetPermissionParameters = { + descriptor: permissions.PermissionDescriptor, + state: permissions.PermissionState, ? context: browsingContext.BrowsingContext, ? origin: text, } From 22c53fa06ae90cd5914b5b4cdc7e85e12e9b2904 Mon Sep 17 00:00:00 2001 From: Thiago PerrottaDate: Thu, 9 Nov 2023 16:34:09 +0100 Subject: [PATCH 04/28] fix nesting --- index.html | 318 ++++++++++++++++++++++++++--------------------------- 1 file changed, 159 insertions(+), 159 deletions(-) diff --git a/index.html b/index.html index 89021fb..b85b1a7 100644 --- a/index.html +++ b/index.html @@ -1299,182 +1299,182 @@
- This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification. -
-- The permissions module contains commands for - managing the remote end browser permissions. + This document defines the following [=extension modules=] for the [[WebDriver-BiDi]] specification.
- [=remote end definition=] + The permissions module contains commands for + managing the remote end browser permissions.
-- PermissionsCommand = ( - permissions.setPermission - ) --
- permissions.PermissionDescriptor = { - type: "permissionDescriptor", - name: text, - } -+
- The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+ [=remote end definition=]
+ PermissionsCommand = ( + permissions.setPermission + ) +
- permissions.PermissionState = "granted" / "denied" / "prompt" --
- The permissions.PermissionState
type represents a {{PermissionState}}.
-
+ permissions.PermissionDescriptor = { + type: "permissionDescriptor", + name: text, + } ++
+ The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+
+ permissions.PermissionState = "granted" / "denied" / "prompt" ++
+ The permissions.PermissionState
type represents a {{PermissionState}}.
+
- The Set Permission - [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s - [=permission state=]. -
-- permissions.setPermission = ( - method: "permissions.setPermission", - params: permissions.SetPermissionParameters - ) ++ Commands +
++ + The permissions.setPermission Command +
++ The Set Permission + [=extension module=] 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, - ? context: browsingContext.BrowsingContext, - ? origin: text, - } --- Result Type
-- -
-- EmptyResult ---+- The [=remote end steps=] with |session| and |command parameters| are: -
--
- - Let |descriptor| be the value of the
-descriptor
field of - |command parameters|. -- - Let |state| be the value of the
-state
field of |command - parameters|. -- - Let |context id| be the value of the
-context
field of - |command parameters|. -- - If |context id| is not present, let |context| be the [=top-level browsing context=] - of |session|. Otherwise, let |context| be the result of [=trying=] to - [=get a browsing context=] with |context id|. -
-- - Let |permission name| be the value of the
-name
field of - |descriptor| representing {{PermissionDescriptor/name}}. -- - - [=Convert to an IDL value=] (|descriptor|, |state|) of type {{PermissionSetParameters}}. - If this conversion throws an exception, return [=error=] with [=error code=] [=invalid argument=]. -
-- - Let |typedDescriptor| be the object |descriptor| refers to, converted to an IDL - value of |permission name|'s [=powerful - feature/permission descriptor type=]. If this throws an exception, - return [=error=] with [=error code=] [=invalid argument=]. -
-- - If |state| is an inappropriate [=permission state=] for any - implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=]. -
-- - Let |settings| be the [=current settings object=]. -
-- - Let |targets| be a [=/list=] containing all [=environment settings object=] - whose [=environment settings object/origin=] is the same as - the [=environment settings object/origin=] of |settings|. -
-- - Let |tasks| be an empty [=/list=]. -
-- - 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: -
+ permissions.SetPermissionParameters = { + descriptor: permissions.PermissionDescriptor, + state: permissions.PermissionState, + ? context: browsingContext.BrowsingContext, + ? origin: text, + } + + +- Result Type
+- +
+ ++ EmptyResult +++++ The [=remote end steps=] with |session| and |command parameters| are: +
++
-- + Let |descriptor| be the value of the
+descriptor
field of + |command parameters|. +- + Let |state| be the value of the
+state
field of |command + parameters|. +- + Let |context id| be the value of the
+context
field of + |command parameters|. +- + If |context id| is not present, let |context| be the [=top-level browsing context=] + of |session|. Otherwise, let |context| be the result of [=trying=] to + [=get a browsing context=] with |context id|. +
+- + Let |permission name| be the value of the
+name
field of + |descriptor| representing {{PermissionDescriptor/name}}. +- + + [=Convert to an IDL value=] (|descriptor|, |state|) of type {{PermissionSetParameters}}. + If this conversion throws an exception, return [=error=] with [=error code=] [=invalid argument=]. +
+- + Let |typedDescriptor| be the object |descriptor| refers to, converted to an IDL + value of |permission name|'s [=powerful + feature/permission descriptor type=]. If this throws an exception, + return [=error=] with [=error code=] [=invalid argument=]. +
+- + If |state| is an inappropriate [=permission state=] for any + implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=]. +
+- + Let |settings| be the [=current settings object=]. +
+- + Let |targets| be a [=/list=] containing all [=environment settings object=] + whose [=environment settings object/origin=] is the same as + the [=environment settings object/origin=] of |settings|. +
+- + Let |tasks| be an empty [=/list=]. +
+- + For each [=environment settings object=] |target| in |targets|: +
-
- - Interpret |state| as if it were the result of an invocation of [=permission state=] - for |typedDescriptor| with the argument |target| made at this moment. + [=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 |typedDescriptor| 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. -
-- - Return [=success=] with data null. -
- - -- + Wait for all tasks in |tasks| to have executed. +
+- + Return [=success=] with data null. +
+
state
field of |command
parameters|.
- context
field of
- |command parameters|.
- name
field of
|descriptor| representing {{PermissionDescriptor/name}}.
+ TODO: Add user context to SetPermissionParameters. +
++ TODO: Add origin. +
The [=remote end steps=] with |session| and |command parameters| are:
@@ -1456,7 +1461,6 @@|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
- feature/permission descriptor type=]. If this throws an exception, return a [=invalid
- argument=] [=error=].
- @@ -1251,6 +1246,11 @@
|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
+ feature/permission descriptor type=]. If this throws an exception, return a [=invalid
+ argument=] [=error=].
+ descriptor
field of
|command parameters|.
+ name
field of
+ |descriptor| representing {{PermissionDescriptor/name}}.
state
field of |command
parameters|.
name
field of
- |descriptor| representing {{PermissionDescriptor/name}}.
+ If |state| is an inappropriate [=permission state=] for any
+ implementation-defined reason, return [=error=] with [=error code=] [=invalid argument=].
To set a permission given descriptor, and state: +
TODO: Add user context to SetPermissionParameters.
@@ -1437,7 +1437,7 @@permissions.PermissionDescriptor = { - type: "permissionDescriptor", name: text, }From 12f450bc5f54cc5e72c00a8a6526ef9b3b77c9cd Mon Sep 17 00:00:00 2001 From: Thiago Perrotta
- The Set Permission - [=extension module=] simulates user modification of a {{PermissionDescriptor}}'s + The Set Permission + [=command=] simulates user modification of a {{PermissionDescriptor}}'s [=permission state=].
- TODO: Add user context to SetPermissionParameters.
+ TODO: Add user context
to SetPermissionParameters
.
- TODO: Add origin.
+ TODO: Add origin
.
The [=remote end steps=] with |session| and |command parameters| are:
From afd657cc6c9ddd4ecc9dd5174cc005090635dab4 Mon Sep 17 00:00:00 2001
From: Thiago Perrotta -> backticks
---
index.html | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/index.html b/index.html
index e28ad4f..70cf40a 100644
--- a/index.html
+++ b/index.html
@@ -510,8 +510,8 @@
|status|
's {{PermissionStatus/state}} to |permissionDesc|'s
+
The onchange attribute is an event handler whose corresponding
- event handler event type is change
.
+ event handler event type is `change`.
Whenever the [=user agent=] is aware that the state of a {{PermissionStatus}} instance @@ -1113,7 +1113,7 @@
change
at |status|.
+ `change` at |status|.
|rootDesc|.{{PermissionDescriptor/name}}
's [=powerful
+ value of `|rootDesc|.{{PermissionDescriptor/name}}`'s [=powerful
feature/permission descriptor type=]. If this throws an exception, return a [=invalid
argument=] [=error=].
- The permissions.PermissionDescriptor
type represents a {{PermissionDescriptor}}.
+ The `permissions.PermissionDescriptor` type represents a {{PermissionDescriptor}}.
- The permissions.PermissionState
type represents a {{PermissionState}}.
+ The `permissions.PermissionState` type represents a {{PermissionState}}.
- TODO: Add user context
to SetPermissionParameters
.
+ TODO: Add user `context` to `SetPermissionParameters`.
- TODO: Add origin
.
+ TODO: Add `origin`.
The [=remote end steps=] with |session| and |command parameters| are:
descriptor
field of
+ Let |descriptor| be the value of the `descriptor` field of
|command parameters|.
name
field of
+ Let |permission name| be the value of the `name` field of
|descriptor| representing {{PermissionDescriptor/name}}.
state
field of |command
+ Let |state| be the value of the `state` field of |command
parameters|.
+{ "descriptor": { "name": "midi", From 67e7e63be6331f0e4aff3e30039f13804e71fcd7 Mon Sep 17 00:00:00 2001 From: Thiago PerrottaDate: Tue, 21 Nov 2023 11:49:56 +0100 Subject: [PATCH 16/28] drop backticks from |rootDesc| name --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d7b0675..918c50c 100644 --- a/index.html +++ b/index.html @@ -1277,7 +1277,7 @@
For example, user agents that define the "midi" powerful feature as - "always on" may choose to reject a command to set the permission state to + "always on" can choose to reject a command to set the permission state to {{PermissionState/"denied"}} at this step.
From 4a5f3fd905d9c31212cf4e5cd56c5cd06f74532c Mon Sep 17 00:00:00 2001 From: Thiago PerrottaTo set a permission given descriptor, and state:
- TODO: Add user `context` to `SetPermissionParameters`. -
-- TODO: Add `origin`. -
++ TODO: Add `user context` to `SetPermissionParameters`. +
++ TODO: Add `origin` to `SetPermissionParameters`. +
+The [=remote end steps=] with |session| and |command parameters| are:
@@ -1429,14 +1425,10 @@- TODO: Add `user context` to `SetPermissionParameters`. -
-- TODO: Add `origin` to `SetPermissionParameters`. -
The [=remote end steps=] with |session| and |command parameters| are:
From 175f8168ecd533f415918125b0cb97f3aad5502e Mon Sep 17 00:00:00 2001
From: Thiago Perrotta
From a8647fe398409836069586baf605532495605d24 Mon Sep 17 00:00:00 2001
From: Thiago Perrotta
This document defines the following extension commands for the [[WebDriver]] specification.
- URI Template + [=extension command URI template|URI Template=] |
---|