|
680 | 680 | set_spc_transaction_mode: function(mode, context=null) {
|
681 | 681 | return window.test_driver_internal.set_spc_transaction_mode(mode, context);
|
682 | 682 | },
|
| 683 | + |
| 684 | + /** |
| 685 | + * Cancels the Federated Credential Management dialog |
| 686 | + * |
| 687 | + * Matches the `Cancel dialog |
| 688 | + * <https://fedidcg.github.io/FedCM/#webdriver-canceldialog>`_ |
| 689 | + * WebDriver command. |
| 690 | + * |
| 691 | + * @param {WindowProxy} context - Browsing context in which |
| 692 | + * to run the call, or null for the current |
| 693 | + * browsing context. |
| 694 | + * |
| 695 | + * @returns {Promise} Fulfilled after the dialog is canceled, or rejected |
| 696 | + * in case the WebDriver command errors |
| 697 | + */ |
| 698 | + cancel_fedcm_dialog: function(context=null) { |
| 699 | + return window.test_driver_internal.cancel_fedcm_dialog(context); |
| 700 | + }, |
| 701 | + |
| 702 | + /** |
| 703 | + * Selects an account from the Federated Credential Management dialog |
| 704 | + * |
| 705 | + * Matches the `Select account |
| 706 | + * <https://fedidcg.github.io/FedCM/#webdriver-selectaccount>`_ |
| 707 | + * WebDriver command. |
| 708 | + * |
| 709 | + * @param {number} account_index - Index of the account to select. |
| 710 | + * @param {WindowProxy} context - Browsing context in which |
| 711 | + * to run the call, or null for the current |
| 712 | + * browsing context. |
| 713 | + * |
| 714 | + * @returns {Promise} Fulfilled after the account is selected, |
| 715 | + * or rejected in case the WebDriver command errors |
| 716 | + */ |
| 717 | + select_fedcm_account: function(account_index, context=null) { |
| 718 | + return window.test_driver_internal.select_fedcm_account(account_index, context); |
| 719 | + }, |
| 720 | + |
| 721 | + /** |
| 722 | + * Gets the account list from the Federated Credential Management dialog |
| 723 | + * |
| 724 | + * Matches the `Account list |
| 725 | + * <https://fedidcg.github.io/FedCM/#webdriver-accountlist>`_ |
| 726 | + * WebDriver command. |
| 727 | + * |
| 728 | + * @param {WindowProxy} context - Browsing context in which |
| 729 | + * to run the call, or null for the current |
| 730 | + * browsing context. |
| 731 | + * |
| 732 | + * @returns {Promise} fulfilled after the account list is returned, or |
| 733 | + * rejected in case the WebDriver command errors |
| 734 | + */ |
| 735 | + get_fedcm_account_list: function(context=null) { |
| 736 | + return window.test_driver_internal.get_fedcm_account_list(context); |
| 737 | + }, |
| 738 | + |
| 739 | + /** |
| 740 | + * Gets the title of the Federated Credential Management dialog |
| 741 | + * |
| 742 | + * Matches the `Get title |
| 743 | + * <https://fedidcg.github.io/FedCM/#webdriver-gettitle>`_ |
| 744 | + * WebDriver command. |
| 745 | + * |
| 746 | + * @param {WindowProxy} context - Browsing context in which |
| 747 | + * to run the call, or null for the current |
| 748 | + * browsing context. |
| 749 | + * |
| 750 | + * @returns {Promise} Fulfilled after the title is returned, or rejected |
| 751 | + * in case the WebDriver command errors |
| 752 | + */ |
| 753 | + get_fedcm_dialog_title: function(context=null) { |
| 754 | + return window.test_driver_internal.get_fedcm_dialog_title(context); |
| 755 | + }, |
| 756 | + |
| 757 | + /** |
| 758 | + * Gets the type of the Federated Credential Management dialog |
| 759 | + * |
| 760 | + * Matches the `Get dialog type |
| 761 | + * <https://fedidcg.github.io/FedCM/#webdriver-getdialogtype>`_ |
| 762 | + * WebDriver command. |
| 763 | + * |
| 764 | + * @param {WindowProxy} context - Browsing context in which |
| 765 | + * to run the call, or null for the current |
| 766 | + * browsing context. |
| 767 | + * |
| 768 | + * @returns {Promise} Fulfilled after the dialog type is returned, or |
| 769 | + * rejected in case the WebDriver command errors |
| 770 | + */ |
| 771 | + get_fedcm_dialog_type: function(context=null) { |
| 772 | + return window.test_driver_internal.get_fedcm_dialog_type(context); |
| 773 | + }, |
| 774 | + |
| 775 | + /** |
| 776 | + * Sets whether promise rejection delay is enabled for the Federated Credential Management dialog |
| 777 | + * |
| 778 | + * Matches the `Set delay enabled |
| 779 | + * <https://fedidcg.github.io/FedCM/#webdriver-setdelayenabled>`_ |
| 780 | + * WebDriver command. |
| 781 | + * |
| 782 | + * @param {boolean} enabled - Whether to delay FedCM promise rejection. |
| 783 | + * @param {WindowProxy} context - Browsing context in which |
| 784 | + * to run the call, or null for the current |
| 785 | + * browsing context. |
| 786 | + * |
| 787 | + * @returns {Promise} Fulfilled after the delay has been enabled or disabled, |
| 788 | + * or rejected in case the WebDriver command errors |
| 789 | + */ |
| 790 | + set_fedcm_delay_enabled: function(enabled, context=null) { |
| 791 | + return window.test_driver_internal.set_fedcm_delay_enabled(enabled, context); |
| 792 | + }, |
| 793 | + |
| 794 | + /** |
| 795 | + * Resets the Federated Credential Management dialog's cooldown |
| 796 | + * |
| 797 | + * Matches the `Reset cooldown |
| 798 | + * <https://fedidcg.github.io/FedCM/#webdriver-resetcooldown>`_ |
| 799 | + * WebDriver command. |
| 800 | + * |
| 801 | + * @param {WindowProxy} context - Browsing context in which |
| 802 | + * to run the call, or null for the current |
| 803 | + * browsing context. |
| 804 | + * |
| 805 | + * @returns {Promise} Fulfilled after the cooldown has been reset, |
| 806 | + * or rejected in case the WebDriver command errors |
| 807 | + */ |
| 808 | + reset_fedcm_cooldown: function(context=null) { |
| 809 | + return window.test_driver_internal.reset_fedcm_cooldown(context); |
| 810 | + } |
683 | 811 | };
|
684 | 812 |
|
685 | 813 | window.test_driver_internal = {
|
|
805 | 933 | throw new Error("set_spc_transaction_mode() is not implemented by testdriver-vendor.js");
|
806 | 934 | },
|
807 | 935 |
|
| 936 | + async cancel_fedcm_dialog(context=null) { |
| 937 | + throw new Error("cancel_fedcm_dialog() is not implemented by testdriver-vendor.js"); |
| 938 | + }, |
| 939 | + |
| 940 | + async select_fedcm_account(account_index, context=null) { |
| 941 | + throw new Error("select_fedcm_account() is not implemented by testdriver-vendor.js"); |
| 942 | + }, |
| 943 | + |
| 944 | + async get_fedcm_account_list(context=null) { |
| 945 | + throw new Error("get_fedcm_account_list() is not implemented by testdriver-vendor.js"); |
| 946 | + }, |
| 947 | + |
| 948 | + async get_fedcm_dialog_title(context=null) { |
| 949 | + throw new Error("get_fedcm_dialog_title() is not implemented by testdriver-vendor.js"); |
| 950 | + }, |
| 951 | + |
| 952 | + async get_fedcm_dialog_type(context=null) { |
| 953 | + throw new Error("get_fedcm_dialog_type() is not implemented by testdriver-vendor.js"); |
| 954 | + }, |
| 955 | + |
| 956 | + async set_fedcm_delay_enabled(enabled, context=null) { |
| 957 | + throw new Error("set_fedcm_delay_enabled() is not implemented by testdriver-vendor.js"); |
| 958 | + }, |
| 959 | + |
| 960 | + async reset_fedcm_cooldown(context=null) { |
| 961 | + throw new Error("reset_fedcm_cooldown() is not implemented by testdriver-vendor.js"); |
| 962 | + } |
808 | 963 | };
|
809 | 964 | })();
|
0 commit comments