Bug 1334388 - Rework u2f/test/test_multiple_keys to fix intermittent
This is a cheezy fix to u2f/tests/frame_multiple_keys.html to try and fix
the ongoing intermittents. It's cheesy because it changes this from a
HTTPS-scheme test to HTTP, which is kind of a negative change, and shouldn't
do anything to help. It does, however, make this test look identical to the
other u2f tests which _don't_ have this intermittent issue. If this commit
fixes the problem then I'll know more about this strange failure case.
MozReview-Commit-ID: JXXFshJ6AGq
--- a/dom/u2f/tests/frame_multiple_keys.html
+++ b/dom/u2f/tests/frame_multiple_keys.html
@@ -17,17 +17,16 @@ function keyHandleFromRegResponse(aRegRe
var keyHandleBytes = registrationData.slice(67, 67 + keyHandleLength);
return {
version: "U2F_V2",
keyHandle: bytesToBase64UrlSafe(keyHandleBytes),
};
}
-local_setParentOrigin("https://example.com");
local_expectThisManyTests(1);
// Ensure the SpecialPowers push worked properly
local_isnot(window.u2f, undefined, "U2F API endpoint must exist");
var challenge = new Uint8Array(16);
window.crypto.getRandomValues(challenge);
--- a/dom/u2f/tests/mochitest.ini
+++ b/dom/u2f/tests/mochitest.ini
@@ -25,9 +25,8 @@ skip-if = !e10s
[test_appid_facet.html]
skip-if = !e10s
[test_appid_facet_insecure.html]
skip-if = !e10s
[test_appid_facet_subdomain.html]
skip-if = !e10s
[test_multiple_keys.html]
skip-if = !e10s
-scheme = https
--- a/dom/u2f/tests/test_multiple_keys.html
+++ b/dom/u2f/tests/test_multiple_keys.html
@@ -22,17 +22,17 @@ SimpleTest.waitForExplicitFinish();
// This is necessary since the U2F object on window is hidden behind a preference
// and window won't pick up changes by pref without a reload.
SpecialPowers.pushPrefEnv({"set": [["security.webauth.u2f", true],
["security.webauth.u2f_enable_softtoken", true],
["security.webauth.u2f_enable_usbtoken", false]]},
function() {
// listen for messages from the test harness
window.addEventListener("message", handleEventMessage);
- document.getElementById('testing_frame').src = "frame_multiple_keys.html";
+ document.getElementById('testing_frame').src = "https://example.com/tests/dom/u2f/tests/frame_multiple_keys.html";
});
</script>
<div id="framediv">
<iframe id="testing_frame"></iframe>
</div>
</body>