Bug 1334388 - Rework u2f/test/test_multiple_keys to fix intermittent draft
authorJ.C. Jones <jjones@mozilla.com>
Mon, 13 Mar 2017 10:00:59 -0700
changeset 497687 ddc4be162d4d695e3de4b114a95c053a30744ae7
parent 497654 7b19a63862252ffb89bfe1ba79724e76e20fb6f4
child 548944 2cda9d2c9e72ec6d6ebc74475c82b8ebd107f1dc
push id48959
push userbmo:jjones@mozilla.com
push dateMon, 13 Mar 2017 17:01:41 +0000
bugs1334388
milestone55.0a1
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
dom/u2f/tests/frame_multiple_keys.html
dom/u2f/tests/mochitest.ini
dom/u2f/tests/test_multiple_keys.html
--- 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>