зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1551342 - Update U2F, WebAuthn, and CredMan tests for Android r=keeler
The new Android functionality can conflict with the tests' expected behavior, so it should be generally disabled, like the Rust module. Differential Revision: https://phabricator.services.mozilla.com/D31266 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
33f3c7c417
Коммит
dafe417481
|
@ -45,7 +45,8 @@ function handleEventMessage(event) {
|
|||
window.addEventListener("message", handleEventMessage);
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false]]},
|
||||
function() {
|
||||
document.getElementById("frame_top").src = "https://example.com/tests/dom/credentialmanagement/tests/mochitest/frame_credman_iframes.html";
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ add_task(async function test_abort() {
|
|||
Services.prefs.setBoolPref("security.webauth.u2f", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_softtoken", false);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_usbtoken", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_android_fido2", false);
|
||||
|
||||
// Create a new tab for the MakeCredential() request.
|
||||
let tab_create = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
|
||||
|
|
|
@ -25,6 +25,7 @@ add_task(async function () {
|
|||
Services.prefs.setBoolPref("security.webauth.u2f", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_softtoken", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_usbtoken", false);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_android_fido2", false);
|
||||
|
||||
// Open a new tab.
|
||||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_URL);
|
||||
|
|
|
@ -33,6 +33,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
window.addEventListener("message", handleEventMessage);
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function(){
|
||||
document.getElementById('testing_frame').src = "https://example.com/tests/dom/u2f/tests/frame_appid_facet.html";
|
||||
|
|
|
@ -33,6 +33,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
window.addEventListener("message", handleEventMessage);
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function(){
|
||||
document.getElementById('testing_frame').src = "http://test2.example.com/tests/dom/u2f/tests/frame_appid_facet_insecure.html";
|
||||
|
|
|
@ -33,6 +33,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
window.addEventListener("message", handleEventMessage);
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function(){
|
||||
document.getElementById('testing_frame').src = "https://test1.example.com/tests/dom/u2f/tests/frame_appid_facet_subdomain.html";
|
||||
|
|
|
@ -33,6 +33,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
window.addEventListener("message", handleEventMessage);
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function(){
|
||||
document.getElementById('testing_frame').src = "https://test2.example.com/tests/dom/u2f/tests/frame_multiple_keys.html";
|
||||
|
|
|
@ -31,6 +31,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
// listen for messages from the test harness
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", true],
|
||||
]}, () => {
|
||||
addEventListener("message", handleEventMessage);
|
||||
|
|
|
@ -31,6 +31,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
// listen for messages from the test harness
|
||||
|
|
|
@ -27,6 +27,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
// listen for messages from the test harness
|
||||
|
|
|
@ -86,6 +86,7 @@ add_task(async function test_setup() {
|
|||
"set": [
|
||||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", true]
|
||||
]
|
||||
});
|
||||
|
|
|
@ -93,6 +93,7 @@ function promiseWebAuthnSign(tab, key_handle, extensions = {}) {
|
|||
add_task(function test_setup() {
|
||||
Services.prefs.setBoolPref("security.webauth.u2f", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_android_fido2", false);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_softtoken", true);
|
||||
Services.prefs.setBoolPref("security.webauth.webauthn_enable_usbtoken", false);
|
||||
});
|
||||
|
|
|
@ -99,6 +99,7 @@ add_task(async function test_setup_usbtoken() {
|
|||
["security.webauth.u2f", false],
|
||||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", true]
|
||||
]
|
||||
});
|
||||
|
|
|
@ -98,6 +98,7 @@ add_task(async function test_setup() {
|
|||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_testing_allow_direct_attestation", true]
|
||||
]
|
||||
});
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]});
|
||||
});
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_testing_allow_direct_attestation", true],
|
||||
]});
|
||||
});
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]});
|
||||
});
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]});
|
||||
});
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@
|
|||
return SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]});
|
||||
});
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]},
|
||||
function() {
|
||||
PublicKeyCredential.isExternalCTAP2SecurityKeySupported()
|
||||
.then(aResult => ok(true, `Should always return either true or false: ${aResult}`))
|
||||
|
|
|
@ -23,7 +23,9 @@ SimpleTest.waitForExplicitFinish();
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
]},
|
||||
async function() {
|
||||
// This test ensures that isUserVerifyingPlatformAuthenticatorAvailable()
|
||||
// is a callable method, but with the softtoken enabled, it's not useful to
|
||||
|
|
|
@ -25,6 +25,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_usbtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_testing_allow_direct_attestation", true]]},
|
||||
function() {
|
||||
is(navigator.authentication, undefined, "navigator.authentication does not exist any longer");
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]}, runTests);
|
||||
function runTests() {
|
||||
is(navigator.authentication, undefined, "navigator.authentication does not exist any longer");
|
||||
|
|
|
@ -24,6 +24,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
// Turn off all tokens. This should result in "not allowed" failures
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
function() {
|
||||
is(navigator.authentication, undefined, "navigator.authentication does not exist any longer");
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
return SpecialPowers.pushPrefEnv({"set": [
|
||||
["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", false],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", true],
|
||||
]});
|
||||
});
|
||||
|
|
|
@ -299,6 +299,7 @@
|
|||
};
|
||||
SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]},
|
||||
runTests);
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
add_task(async function(){
|
||||
await SpecialPowers.pushPrefEnv({"set": [["security.webauth.webauthn", true],
|
||||
["security.webauth.webauthn_enable_softtoken", true],
|
||||
["security.webauth.webauthn_enable_android_fido2", false],
|
||||
["security.webauth.webauthn_enable_usbtoken", false]]});
|
||||
|
||||
isnot(navigator.credentials, undefined, "Credential Management API endpoint must exist");
|
||||
|
|
Загрузка…
Ссылка в новой задаче