Skip to content

Commit

Permalink
[devtools] Throw adding 2 internal authenticators
Browse files Browse the repository at this point in the history
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 <[email protected]>
Auto-Submit: Nina Satragno <[email protected]>
Commit-Queue: Alex Rudenko <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1388668}
  • Loading branch information
nsatragno authored and chromium-wpt-export-bot committed Nov 27, 2024
1 parent a393fab commit d05c649
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -56,6 +56,7 @@
enabled = false;
name = e.name;
}
await window.test_driver.remove_virtual_authenticator(authenticator);
parent.postMessage({ type: 'availability-result', enabled, name }, '*');
}
</script>

0 comments on commit d05c649

Please sign in to comment.