Commit 623bf644 authored by Adam Langley's avatar Adam Langley Committed by Chromium LUCI CQ

Deflake WebAuthJavascriptClientBrowserTest.CreatePublicKeyCredentialWithAbortSetAfterCreate

Fixed: 1166254
Change-Id: I4bfd0c178757d7b24959180b9db083d545607b68
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628046
Auto-Submit: Adam Langley <agl@chromium.org>
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#843324}
parent 71ba4672
...@@ -994,7 +994,17 @@ IN_PROC_BROWSER_TEST_F(WebAuthJavascriptClientBrowserTest, ...@@ -994,7 +994,17 @@ IN_PROC_BROWSER_TEST_F(WebAuthJavascriptClientBrowserTest,
// signal's aborted flag set after sending request, we get an AbortError. // signal's aborted flag set after sending request, we get an AbortError.
IN_PROC_BROWSER_TEST_F(WebAuthJavascriptClientBrowserTest, IN_PROC_BROWSER_TEST_F(WebAuthJavascriptClientBrowserTest,
CreatePublicKeyCredentialWithAbortSetAfterCreate) { CreatePublicKeyCredentialWithAbortSetAfterCreate) {
InjectVirtualFidoDeviceFactory(); // This test sends the abort signal after making the WebAuthn call. However,
// the WebAuthn call could complete before the abort signal is sent, leading
// to a flakey test. Thus the |simulate_press_callback| is installed and
// always returns false, to ensure that the VirtualFidoDevice stalls the
// WebAuthn call and the abort signal will happen in time.
device::test::VirtualFidoDeviceFactory* virtual_device_factory =
InjectVirtualFidoDeviceFactory();
virtual_device_factory->mutable_state()->simulate_press_callback =
base::BindRepeating(
[](device::VirtualFidoDevice*) -> bool { return false; });
CreateParameters parameters; CreateParameters parameters;
parameters.signal = "authAbortSignal"; parameters.signal = "authAbortSignal";
std::string result; std::string result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment