From d05c649bf1f54d0eec5e87d33b3ac7e8cdd1cc1b Mon Sep 17 00:00:00 2001 From: Nina Satragno Date: Wed, 27 Nov 2024 00:21:16 -0800 Subject: [PATCH] [devtools] Throw adding 2 internal authenticators Have devtools throw an error when a client attempts to add an internal authenticator when there's one already present in the environment. This is not supported and causes all sorts of issues. This requires fixing a WPT that did not clean the virtual authenticator. The WPT passing and not crashing Chrome previously was luck. Fixed: 40234612 Change-Id: I25d6e6c3387d0180234c21af157bc0b6ef15f566 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6047769 Reviewed-by: Alex Rudenko Auto-Submit: Nina Satragno Commit-Queue: Alex Rudenko Cr-Commit-Position: refs/heads/main@{#1388668} --- .../resources/permissions-policy-payment-extension.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/permissions-policy/resources/permissions-policy-payment-extension.html b/permissions-policy/resources/permissions-policy-payment-extension.html index a4ac736293dac4..9d74c4684bb596 100644 --- a/permissions-policy/resources/permissions-policy-payment-extension.html +++ b/permissions-policy/resources/permissions-policy-payment-extension.html @@ -15,7 +15,7 @@ window.onload = async function() { test_driver.set_test_context(parent); - await window.test_driver.add_virtual_authenticator(authenticatorArgs); + const authenticator = await window.test_driver.add_virtual_authenticator(authenticatorArgs); let enabled = true; let name = `OK`; try { @@ -56,6 +56,7 @@ enabled = false; name = e.name; } + await window.test_driver.remove_virtual_authenticator(authenticator); parent.postMessage({ type: 'availability-result', enabled, name }, '*'); }