Skip to content

Commit 460e396

Browse files
committed
Specify the webdriver command to open terms of service and privacy policy
1 parent 10794f7 commit 460e396

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

spec/index.bs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2297,7 +2297,32 @@ The [=remote end steps=] are:
22972297
1. Let |dialogButton| be the result of [=getting a property=] named
22982298
`"dialogButton"` from |parameters|.
22992299

2300-
1. If |dialogButton| is not a string that is "`ConfirmIdpLoginContinue`", return
2300+
1. If |dialogButton| is not a string, return
2301+
a [=error|WebDriver error=] with [=error code=] [=invalid argument=].
2302+
2303+
1. If |dialogButton| is "`TermsOfService`" or "`PrivacyPolicy`":
2304+
1. If no FedCM dialog is currently open or the dialog is not a dialog that
2305+
lets a user select an account, return a [=error|WebDriver error=] with
2306+
[=error code=] [=no such alert=].
2307+
1. Let |index| be the result of [=getting a property=] named
2308+
`"index"` from |parameters|.
2309+
1. If |index| is not an integer, or is less than zero or greater than
2310+
or equal to the number of accounts that the user can choose from in the
2311+
current flow, return a [=error|WebDriver error=] with [=error code=]
2312+
[=invalid argument=].
2313+
1. If the account at |index| does not have a terms of service or privacy
2314+
policy URL, either because none was provided in the [=client metadata
2315+
endpoint=] or because [=compute the connection status=] for the account
2316+
returned [=compute the connection status/connected=], return a
2317+
[=error|WebDriver error=] with [=error code=] [=invalid argument=].
2318+
1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
2319+
{{IdentityProviderAccount/terms_of_service_url}}, or if |dialogButton|
2320+
is "`PrivacyPolicy`", open the account's
2321+
{{IdentityProviderAccount/privacy_policy_url}}, as if the user had
2322+
clicked the corresponding link in the account.
2323+
1. Return [=success=] with data `null`.
2324+
2325+
1. If |dialogButton| is not "`ConfirmIdpLoginContinue`", return
23012326
a [=error|WebDriver error=] with [=error code=] [=invalid argument=].
23022327

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

0 commit comments

Comments
 (0)