Skip to content

Commit

Permalink
Specify the webdriver command to open terms of service and privacy po…
Browse files Browse the repository at this point in the history
…licy
  • Loading branch information
cbiesinger committed Sep 12, 2024
1 parent 6acc8f8 commit 63259a0
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,32 @@ The [=remote end steps=] are:
1. Let |dialogButton| be the result of [=getting a property=] named
`"dialogButton"` from |parameters|.

1. If |dialogButton| is not a string that is "`ConfirmIdpLoginContinue`", return
1. If |dialogButton| is not a string, return
a [=error|WebDriver error=] with [=error code=] [=invalid argument=].

1. If |dialogButton| is "`TermsOfService`" or "`PrivacyPolicy`":
1. If no FedCM dialog is currently open or the dialog is not a dialog that
lets a user select an account, return a [=error|WebDriver error=] with
[=error code=] [=no such alert=].
1. Let |index| be the result of [=getting a property=] named
`"index"` from |parameters|.
1. If |index| is not an integer, or is less than zero or greater than
or equal to the number of accounts that the user can choose from in the
current flow, return a [=error|WebDriver error=] with [=error code=]
[=invalid argument=].
1. If the account at |index| does not have a terms of service or privacy
policy URL, either because none was provided in the [=client metadata
endpoint=] or because [=compute the connection status=] for the account
returned [=compute the connection status/connected=], return a
[=error|WebDriver error=] with [=error code=] [=invalid selector=].
1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
{{IdentityProviderClientMetadata/terms_of_service_url}}, or if
|dialogButton| is "`PrivacyPolicy`", open the account's
{{IdentityProviderClientMetadata/privacy_policy_url}}, as if the user
had clicked the corresponding link in the account.
1. Return [=success=] with data `null`.

1. If |dialogButton| is not "`ConfirmIdpLoginContinue`", return
a [=error|WebDriver error=] with [=error code=] [=invalid argument=].

1. If no FedCM dialog is currently open or the dialog is not a [=confirm IDP
Expand Down

0 comments on commit 63259a0

Please sign in to comment.