Closed Bug 1610732 Opened 4 years ago Closed 4 years ago

Stop using NS_ERROR_DOM_TYPE_ERR in webauthn

Categories

(Core :: DOM: Web Authentication, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(2 files)

It makes us throw incorrect exceptions.

This is needed so we can actually test the fix for the bug we're fixing.

The test changes are for the following reasons:

  1. Removing the "empty ArrayBuffer" test: I don't see anything obvious in the
    spec that would cause that to reject before prompting the user, and in fact it
    does not do that in browsers. All browsers time out on that line.

  2. Removing the "name is object" test: This test is wrong. Passing {} where a
    string is expected in IDL will come out as the string "[object Object]" on the
    other side, and that seems like a perfectly valid name.

  3. Removing the "name is null" test: This test is wrong. Passing null where a
    string is expected in IDL will come out as the string "null" on the other side,
    and that seems like a perfectly valid name.

  4. Removing the "name is empty" test: I don't see anything obvious in the
    spec that would cause that to reject before prompting the user.

  5. Removing the various "icon is whatever" tests: I don't see anything obvious in the
    spec that would cause that to reject before prompting the user.

  6. Removing the various "displayName is whatever" tests: the same reasoning as
    for the coresponding "name is whatever" tests applies.

Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/42547ab8bb61
part 1.  Switch some webauthn tests to non-legacy promise_rejects_* functions.  r=jcj
https://hg.mozilla.org/integration/autoland/rev/274fbf05b895
part 2.  Throw the right exception when a user.id value is too long.  r=jcj
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/21348 for changes under testing/web-platform/tests
Flags: needinfo?(bzbarsky)

See https://github.com/web-platform-tests/wpt/pull/21348#issuecomment-577340367 -- the webauthn tests are all mostly broken and time out in all browsers; this change is not affecting that, apart from making one of them not time out.

Flags: needinfo?(bzbarsky)
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Summary: Stop using NS_ERROR_DOM_SECURITY_ERR in webauthn → Stop using NS_ERROR_DOM_TYPE_ERR in webauthn
Upstream PR merged by jgraham
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: