Bug 1417138 part 1 - Skip about:downloads in about url test. r?Gijs draft
authorXidorn Quan <me@upsuper.org>
Wed, 14 Feb 2018 17:01:57 +1100
changeset 755551 dddcdc9cbd5a28d78f37a8381e7963bff716480e
parent 755550 2ab4026fd4d3fc5453bb36056220294ed62365c8
child 755552 d8170919d2f2d7e9d9e783741a6e3d0fd70436f5
child 756109 64424c243022c67992ec02c9ddb2e525c47473b3
push id99188
push userxquan@mozilla.com
push dateThu, 15 Feb 2018 12:58:09 +0000
reviewersGijs
bugs1417138
milestone60.0a1
Bug 1417138 part 1 - Skip about:downloads in about url test. r?Gijs MozReview-Commit-ID: HfgQI5OlvI9
browser/components/contextualidentity/test/browser/browser_aboutURLs.js
--- a/browser/components/contextualidentity/test/browser/browser_aboutURLs.js
+++ b/browser/components/contextualidentity/test/browser/browser_aboutURLs.js
@@ -2,37 +2,41 @@
 
 // For some about: URLs, they will take more time to load and cause timeout.
 // See Bug 1270998.
 requestLongerTimeout(2);
 
 add_task(async function() {
   let aboutURLs = [];
 
-  // List of about: URLs that will initiate network requests.
-  let networkURLs = [
+  // List of about: URLs that may cause problem, so we skip them in this test.
+  let skipURLs = [
+    // about:credits will initiate network request.
     "credits",
-    "telemetry" // about:telemetry will fetch Telemetry asynchrounously and takes
-                // longer, we skip this for now.
+    // about:telemetry will fetch Telemetry asynchronously and takes longer,
+    // so we skip this for now.
+    "telemetry",
+    // about:downloads causes a shutdown leak with stylo-chrome. bug 1419943.
+    "downloads"
   ];
 
   for (let cid in Cc) {
     let result = cid.match(/@mozilla.org\/network\/protocol\/about;1\?what\=(.*)$/);
     if (!result) {
       continue;
     }
 
     let aboutType = result[1];
     let contract = "@mozilla.org/network/protocol/about;1?what=" + aboutType;
     try {
       let am = Cc[contract].getService(Ci.nsIAboutModule);
       let uri = Services.io.newURI("about:" + aboutType);
       let flags = am.getURIFlags(uri);
       if (!(flags & Ci.nsIAboutModule.HIDE_FROM_ABOUTABOUT) &&
-          !networkURLs.includes(aboutType)) {
+          !skipURLs.includes(aboutType)) {
         aboutURLs.push(aboutType);
       }
     } catch (e) {
       // getService might have thrown if the component doesn't actually
       // implement nsIAboutModule
     }
   }