// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module blink.test.mojom; enum DialogButton { kConfirmIdpLoginContinue, kErrorGotIt, kErrorMoreDetails, }; // Provides a way for tests without chromedriver support to execute certain FedCM commands. // See https://fedidcg.github.io/FedCM/#automation. interface FederatedAuthRequestAutomation { // Gets the dialog type of the current FedCM dialog, if one is open. GetDialogType() => (string? title); // Returns the title and subtitle of the current FedCM dialog, if any is open // at the time it is invoked. GetFedCmDialogTitleAndSubtitle() => (string? title, string? subtitle); // Selects the account with the given account_index, if there is any FedCM account chooser open. SelectFedCmAccount(uint32 account_index) => (bool success); // Dismisses the current dialog, if one is open. DismissFedCmDialog() => (bool success); // Clicks on a button in the current dialog, if one is open. ClickFedCmDialogButton(DialogButton dialog_button) => (bool success); };