gecko-dev/dom/u2f/tests
J.C. Jones f7a8b4c054 Bug 1448408 - Web Authentication - Don't immediately abort on visibility events r=keeler
The published recommendation of L1 for WebAuthn changed the visibility/focus
listening behaviors to a SHOULD [1], and Chromium, for reasons like our SoftU2F
bug [0], opted to not interrupt on tabswitch/visibility change.

Let's do the same thing.

This changes the visibility mechanism to set a flag on an ongoing transaction,
and then, upon multiple calls to the FIDO/U2F functions, only aborts if
visibility had changed. Otherwise, subsequent callers return early.

This is harder to explain than it is really to use as a user. I think. At least,
my testing feels natural when I'm working within two windows, both potentially
prompting WebAuthn.

Note: This also affects FIDO U2F API.

[0] https://bugzilla.mozilla.org/show_bug.cgi?id=1448408#c0
[1] https://www.w3.org/TR/webauthn-1/#abortoperation

Differential Revision: https://phabricator.services.mozilla.com/D25160

--HG--
extra : moz-landing-system : lando
2019-03-29 17:59:08 +00:00
..
browser Bug 1448408 - Web Authentication - Don't immediately abort on visibility events r=keeler 2019-03-29 17:59:08 +00:00
pkijs
.eslintrc.js Bug 1512052 - Add more .eslintrc.js files for test directories. r=mossop 2018-12-11 13:15:08 +00:00
frame_appid_facet_insecure.html Backed out 2 changesets (bug 1488417, bug 1259822) for web compat issues. 2018-12-10 10:47:47 -06:00
frame_appid_facet_subdomain.html
frame_appid_facet.html
frame_multiple_keys.html
frame_no_token.html
frame_override_request.html Bug 1448408 - Web Authentication - Don't immediately abort on visibility events r=keeler 2019-03-29 17:59:08 +00:00
frame_register_sign.html
frame_register.html
frame_utils.js
mochitest.ini Bug 1525959 - Skip some mochitests tests under GeckoView r=geckoview-reviewers,esawin 2019-02-27 15:01:43 +00:00
README.md
test_appid_facet_insecure.html
test_appid_facet_subdomain.html
test_appid_facet.html
test_multiple_keys.html
test_no_token.html
test_override_request.html
test_register_sign.html
test_register.html
test_util_methods.html
u2futil.js

Note:

While conceptually similar to the tests for Web Authentication (dom/webauthn), the tests for U2F require an iframe while window.u2f remains hidden behind a preference, though WebAuthn does not. The reason is that the window object doesn't mutate upon a call by SpecialPowers.setPrefEnv() the way that the navigator objects do, rather you have to load a different page with a different window object for the preference change to be honored.