Commit 40ba65fa authored by Nina Satragno's avatar Nina Satragno Committed by Commit Bot

[webauthn] WPT Fix error for exclude credentials

When an excluded credential is found, the spec says InvalidStateError
should be returned. The test was expecting a NotAllowedError, fix that.

Bug: 875444
Change-Id: I034ea2c270909895f8935a5c5a4d659b6c7327dc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2088000
Commit-Queue: Nina Satragno <nsatragno@chromium.org>
Reviewed-by: default avatarKen Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747018}
parent 28dfbb15
This is a testharness.js-based test.
PASS Bad excludeCredentials: string
PASS Bad excludeCredentials: empty object
PASS excludeCredentials missing
PASS excludeCredentials empty array
FAIL exclude existing credential promise_rejects_dom: expected to fail on excluded credenetial function "function() { throw e }" threw object "InvalidStateError: The user attempted to register an authenticator that contains one of the credentials already registered with the relying party." that is not a DOMException NotAllowedError: property "code" is equal to 11, expected 0
PASS exclude random (non-existing) credential
PASS Clean up the test environment
Harness: the test ran to completion.
......@@ -45,7 +45,7 @@ standardSetup(function() {
}
};
var p = createCredential(args);
return promise_rejects_dom(t, "NotAllowedError", p, "expected to fail on excluded credenetial");
return promise_rejects_dom(t, "InvalidStateError", p, "expected to fail on excluded credential");
});
}, "exclude existing credential");
......
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