gecko-dev/dom/u2f/tests
J.C. Jones 4fc5b851c3 Bug 1335899 - Tolerate token failures in U2F.cpp r=keeler
If there's a second token (say, USB anyone?) that fails early, U2F.cpp's
U2FStatus object should not be told to "stop" unless it's actually done.

So basically, in the promise failures for U2F::Sign and U2F::Register, don't
call Stop - let the stop come implicitly when no tokens respond correctly.

This changes U2FStatus to be used the same way WebAuthn does its WebAuthnRequest
object, for the same purpose.

- Review updates from Keeler; thanks!


MozReview-Commit-ID: HaTKopFakDB

--HG--
extra : rebase_source : f55918f76117abb0f120b21a742c3705c2640225
2017-02-01 15:00:34 -07:00
..
pkijs Bug 1244960 - FIDO u2f NSSToken (Part 2): Use Attestation Certificates. r=keeler 2016-03-28 18:55:52 -07:00
README.md Bug 1333592 - Fix a regression with U2F sign() called with multiple keys r=keeler 2017-01-26 15:18:50 -07:00
frame_appid_facet.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
frame_appid_facet_insecure.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
frame_appid_facet_subdomain.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
frame_multiple_keys.html Bug 1335899 - Tolerate token failures in U2F.cpp r=keeler 2017-02-01 15:00:34 -07:00
frame_no_token.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
frame_register.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
frame_register_sign.html Bug 1281932 - Fix intermittent u2f tests r=keeler 2016-10-10 17:06:31 -07:00
mochitest.ini Bug 1333592 - Fix a regression with U2F sign() called with multiple keys r=keeler 2017-01-26 15:18:50 -07:00
test_appid_facet.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_appid_facet_insecure.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_appid_facet_subdomain.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_multiple_keys.html Bug 1333592 - Fix a regression with U2F sign() called with multiple keys r=keeler 2017-01-26 15:18:50 -07:00
test_no_token.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_register.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_register_sign.html Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws. 2017-01-17 11:50:25 +01:00
test_util_methods.html Bug 1265211 - Fix intermittent U2F Test r=mgoodwin 2016-04-19 08:49:13 -07:00
u2futil.js Bug 1333592 - Fix a regression with U2F sign() called with multiple keys r=keeler 2017-01-26 15:18:50 -07:00

README.md

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.