Bug 1626482 - Set privacy.partition.network_state to false in test_ext_identity to avoid intermittent failures. r=mixedpuppy
authorLuca Greco <lgreco@mozilla.com>
Wed, 27 May 2020 02:00:44 +0000
changeset 532338 e230153536a602f4341ce5100c8d6a71763732a9
parent 532337 7a6cac6f591da0cff8d40116d0e3181e231c40f4
child 532339 b802b3353432984240f915b2d0c2185dd341d263
push id37454
push userccoroiu@mozilla.com
push dateWed, 27 May 2020 16:14:31 +0000
treeherdermozilla-central@a1dd9afbfdf5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1626482
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1626482 - Set privacy.partition.network_state to false in test_ext_identity to avoid intermittent failures. r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D76924
toolkit/components/extensions/test/mochitest/test_ext_identity.html
--- a/toolkit/components/extensions/test/mochitest/test_ext_identity.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_identity.html
@@ -9,17 +9,23 @@
 </head>
 <body>
 
 <script type="text/javascript">
 "use strict";
 
 add_task(async function setup() {
   await SpecialPowers.pushPrefEnv({
-    set: [["extensions.webextensions.identity.redirectDomain", "example.com"]],
+    set: [
+      ["extensions.webextensions.identity.redirectDomain", "example.com"],
+      // Disable the network cache first-party partition during this
+      // test (TODO: look more closely to how that is affecting the intermittency
+      // of this test on MacOS, see Bug 1626482).
+      ["privacy.partition.network_state", false],
+    ],
   });
 });
 
 add_task(async function test_noPermission() {
   let extension = ExtensionTestUtils.loadExtension({
     background() {
       browser.test.assertEq(
         undefined,
@@ -199,17 +205,17 @@ function background_launchWebAuthFlow({
   url = `${url}?${query.join("&")}`;
 
   // Ensure we do not start the actual request for the redirect url.  In the case
   // of a 303 POST redirect we are getting a request started.
   let watchRedirectRequest = () => {};
   if (params.post !== 303) {
     watchRedirectRequest = details => {
       if (details.url.startsWith(expected_redirect)) {
-        browser.test.fail(`onSendHeaders called for redirect url: ${JSON.stringify(details)}`);
+        browser.test.fail(`onBeforeRequest called for redirect url: ${JSON.stringify(details)}`);
       }
     };
 
     browser.webRequest.onBeforeRequest.addListener(
       watchRedirectRequest,
       {
         urls: [
           "https://35b64b676900f491c00e7f618d43f7040e88422e.example.com/*",