@@ -2191,7 +2191,32 @@ The [=remote end steps=] are:
219121911. Let |dialogButton| be the result of [=getting a property=] named
21922192 `"dialogButton"` from |parameters|.
21932193
2194- 1. If |dialogButton| is not a string that is "`ConfirmIdpLoginContinue`", return
2194+ 1. If |dialogButton| is not a string, return
2195+ a [=error|WebDriver error=] with [=error code=] [=invalid argument=] .
2196+
2197+ 1. If |dialogButton| is "`TermsOfService`" or "`PrivacyPolicy`":
2198+ 1. If no FedCM dialog is currently open or the dialog is not a dialog that
2199+ lets a user select an account, return a [=error|WebDriver error=] with
2200+ [=error code=] [=no such alert=] .
2201+ 1. Let |index| be the result of [=getting a property=] named
2202+ `"index"` from |parameters|.
2203+ 1. If |index| is not an integer, or is less than zero or greater than
2204+ or equal to the number of accounts that the user can choose from in the
2205+ current flow, return a [=error|WebDriver error=] with [=error code=]
2206+ [=invalid argument=] .
2207+ 1. If the account at |index| does not have a terms of service or privacy
2208+ policy URL, either because none was provided in the [=client metadata
2209+ endpoint=] or because [=compute the connection status=] for the account
2210+ returned [=compute the connection status/connected=] , return a
2211+ [=error|WebDriver error=] with [=error code=] [=invalid selector=] .
2212+ 1. Otherwise, if |dialogButton| is "`TermsOfService`", open the account's
2213+ {{IdentityProviderClientMetadata/terms_of_service_url}} , or if
2214+ |dialogButton| is "`PrivacyPolicy`", open the account's
2215+ {{IdentityProviderClientMetadata/privacy_policy_url}} , as if the user
2216+ had clicked the corresponding link in the account.
2217+ 1. Return [=success=] with data `null`.
2218+
2219+ 1. If |dialogButton| is not "`ConfirmIdpLoginContinue`", return
21952220 a [=error|WebDriver error=] with [=error code=] [=invalid argument=] .
21962221
219722221. If no FedCM dialog is currently open or the dialog is not a [=confirm IDP
0 commit comments