@@ -2297,7 +2297,32 @@ The [=remote end steps=] are:
229722971. 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
230323281. If no FedCM dialog is currently open or the dialog is not a [=confirm IDP
0 commit comments