Bug 1400080 - Remove impossible telemetry test from WebAuthn r?ttaubert
Now that there are actual hardware devices, this test can't be run: it
depended on there being a deliberately-erroring implementation of WebAuthn
which would instantly reject promises. Fortunately, this test was really more
a test that telemetry scalars work properly than really the functionality
of WebAuthn.
Sadly, I don't see any way to re-enable this test without adding a new test-
only pref to the tree, which doesn't seem worth it for the telemetry.
So this patch removes the offending test completely which was backed out in
https://hg.mozilla.org/integration/mozilla-inbound/rev/c115eec567a6 .
MozReview-Commit-ID: LiLuQHbPU1z
--- a/dom/webauthn/tests/browser/browser_webauthn_telemetry.js
+++ b/dom/webauthn/tests/browser/browser_webauthn_telemetry.js
@@ -77,33 +77,11 @@ add_task(async function test_loopback()
is(webauthn_used["U2FSignFinish"], 1, "webauthn_used U2FSignFinish scalar should be 1");
is(webauthn_used["U2FSignAbort"], undefined, "webauthn_used U2FSignAbort scalar must be unset");
is(webauthn_used["U2FRegisterAbort"], undefined, "webauthn_used U2FRegisterAbort scalar must be unset");
validateHistogramEntryCount("WEBAUTHN_CREATE_CREDENTIAL_MS", 1);
validateHistogramEntryCount("WEBAUTHN_GET_ASSERTION_MS", 1);
}
- /*{
- cleanupTelemetry();
- // Same as test_successful_loopback, but we will swap to using a (non-existent)
- // usb token. This will cause U2FRegisterAbort to fire, but will not execute the
- // Sign function, and no histogram entries will log.
- Services.prefs.setBoolPref("security.webauth.webauthn", true);
- Services.prefs.setBoolPref("security.webauth.webauthn_enable_softtoken", false);
- Services.prefs.setBoolPref("security.webauth.webauthn_enable_usbtoken", true);
-
- await executeTestPage(testPage);
-
- let webauthn_used = getTelemetryForScalar("security.webauthn_used");
- ok(webauthn_used, "Scalar keys are set: " + Object.keys(webauthn_used).join(", "));
- is(webauthn_used["U2FRegisterFinish"], undefined, "webauthn_used U2FRegisterFinish must be unset");
- is(webauthn_used["U2FSignFinish"], undefined, "webauthn_used U2FSignFinish scalar must be unset");
- is(webauthn_used["U2FRegisterAbort"], 1, "webauthn_used U2FRegisterAbort scalar should be a 1");
- is(webauthn_used["U2FSignAbort"], undefined, "webauthn_used U2FSignAbort scalar must be unset");
-
- validateHistogramEntryCount("WEBAUTHN_CREATE_CREDENTIAL_MS", 0);
- validateHistogramEntryCount("WEBAUTHN_GET_ASSERTION_MS", 0);
- }*/
-
// There aren't tests for register succeeding and sign failing, as I don't see an easy way to prompt
// the soft token to fail that way _and_ trigger the Abort telemetry.
});