Bug 1334388 - Rework u2f/test/test_multiple_keys to fix intermittent. r=keeler, a=test-only
authorJ.C. Jones <jjones@mozilla.com>
Mon, 13 Mar 2017 10:00:59 -0700
changeset 395196 d38ae6ee4f4f14a439bbbb1694a7dab6191cb416
parent 395195 bc9241831e28d6ed65e8b8ba020476e99f65c436
child 395197 3d8d2b9aaf6e0feb80f4e98129cfc9a856a4e4a2
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskeeler, test-only
bugs1334388
milestone54.0a2
Bug 1334388 - Rework u2f/test/test_multiple_keys to fix intermittent. r=keeler, a=test-only 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>