Backed out changeset a7b0c6ddd812 (bug 863246)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 25 Aug 2017 16:43:33 +0200
changeset 426465 c3d76aac538550ba25ebd96fa4e8f8dda4d47abb
parent 426464 d6cf1a8cde2d0aa9d64d849c6c250879185b5ba0
child 426466 149b351b2f16794f3a54d76645b0f6367531ae58
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs863246
milestone57.0a1
backs outa7b0c6ddd8127027f9cb1c7adcf53321ce392282
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
Backed out changeset a7b0c6ddd812 (bug 863246)
browser/base/content/test/static/browser_all_files_referenced.js
browser/base/content/test/static/browser_parsable_css.js
caps/tests/mochitest/test_bug292789.html
devtools/shared/platform/content/test/test_clipboard.html
dom/security/test/mixedcontentblocker/test_bug803225.html
--- a/browser/base/content/test/static/browser_all_files_referenced.js
+++ b/browser/base/content/test/static/browser_all_files_referenced.js
@@ -168,16 +168,17 @@ var whitelist = [
   // Bug 1351079
   {file: "resource://gre/modules/ISO8601DateUtils.jsm"},
   // Bug 1337345
   {file: "resource://gre/modules/Manifest.jsm"},
   // Bug 1351097
   {file: "resource://gre/modules/accessibility/AccessFu.jsm"},
   // Bug 1351637
   {file: "resource://gre/modules/sdk/bootstrap.js"},
+
 ];
 
 whitelist = new Set(whitelist.filter(item =>
   ("isFromDevTools" in item) == isDevtools &&
   (!item.skipNightly || !AppConstants.NIGHTLY_BUILD) &&
   (!item.platforms || item.platforms.includes(AppConstants.platform))
 ).map(item => item.file));
 
@@ -469,18 +470,17 @@ function findChromeUrlsFromArray(array, 
                        array.indexOf("#".charCodeAt(0), index));
     let string = "";
     for ( ; index < end; ++index) {
       string += String.fromCharCode(array[index]);
     }
 
     // Only keep strings that look like real chrome or resource urls.
     if (/chrome:\/\/[a-zA-Z09 -]+\/(content|skin|locale)\//.test(string) ||
-        /resource:\/\/gre.*\.[a-z]+/.test(string) ||
-        string.startsWith("resource://content-accessible/"))
+        /resource:\/\/gre.*\.[a-z]+/.test(string))
       gReferencesFromCode.add(string);
   }
 }
 
 add_task(async function checkAllTheFiles() {
   let libxulPath = OS.Constants.Path.libxul;
   if (AppConstants.platform != "macosx")
     libxulPath = OS.Constants.Path.libDir + "/" + libxulPath;
@@ -532,18 +532,16 @@ add_task(async function checkAllTheFiles
   // Wait for all the files to have actually loaded:
   await Promise.all(allPromises);
 
   // Keep only chrome:// files, and filter out either the devtools paths or
   // the non-devtools paths:
   let devtoolsPrefixes = ["chrome://webide/",
                           "chrome://devtools",
                           "resource://devtools/",
-                          "resource://devtools-client-jsonview/",
-                          "resource://devtools-client-shared/",
                           "resource://app/modules/devtools",
                           "resource://gre/modules/devtools"];
   let chromeFiles = [];
   for (let uri of uris) {
     uri = convertToCodeURI(uri.spec);
     if ((uri.startsWith("chrome://") || uri.startsWith("resource://")) &&
         isDevtools == devtoolsPrefixes.some(prefix => uri.startsWith(prefix)))
       chromeFiles.push(uri);
--- a/browser/base/content/test/static/browser_parsable_css.js
+++ b/browser/base/content/test/static/browser_parsable_css.js
@@ -12,17 +12,17 @@
 let whitelist = [
   // CodeMirror is imported as-is, see bug 1004423.
   {sourceName: /codemirror\.css$/i,
    isFromDevTools: true},
   // The debugger uses cross-browser CSS.
   {sourceName: /devtools\/client\/debugger\/new\/debugger.css/i,
    isFromDevTools: true},
    // Reps uses cross-browser CSS.
-   {sourceName: /devtools-client-shared\/components\/reps\/reps.css/i,
+   {sourceName: /devtools\/client\/shared\/components\/reps\/reps.css/i,
    isFromDevTools: true},
   // PDFjs is futureproofing its pseudoselectors, and those rules are dropped.
   {sourceName: /web\/viewer\.css$/i,
    errorMessage: /Unknown pseudo-class.*(fullscreen|selection)/i,
    isFromDevTools: false},
   // PDFjs rules needed for compat with other UAs.
   {sourceName: /web\/viewer\.css$/i,
    errorMessage: /Unknown property.*appearance/i,
@@ -283,59 +283,51 @@ add_task(async function checkAllTheCSS()
       manifestPromises.push(parseManifest(uri));
       return false;
     }
     return true;
   });
   // Wait for all manifest to be parsed
   await Promise.all(manifestPromises);
 
+  // We build a list of promises that get resolved when their respective
+  // files have loaded and produced no errors.
+  let allPromises = [];
+
   // filter out either the devtools paths or the non-devtools paths:
   let isDevtools = SimpleTest.harnessParameters.subsuite == "devtools";
   let devtoolsPathBits = ["webide", "devtools"];
   uris = uris.filter(uri => isDevtools == devtoolsPathBits.some(path => uri.spec.includes(path)));
 
-  let loadCSS = chromeUri => new Promise(resolve => {
-    let linkEl, onLoad, onError;
-    onLoad = e => {
-      processCSSRules(linkEl.sheet);
-      resolve();
-      linkEl.removeEventListener("load", onLoad);
-      linkEl.removeEventListener("error", onError);
-    };
-    onError = e => {
-      ok(false, "Loading " + linkEl.getAttribute("href") + " threw an error!");
-      resolve();
-      linkEl.removeEventListener("load", onLoad);
-      linkEl.removeEventListener("error", onError);
-    };
-    linkEl = doc.createElement("link");
+  for (let uri of uris) {
+    let linkEl = doc.createElement("link");
     linkEl.setAttribute("rel", "stylesheet");
-    linkEl.setAttribute("type", "text/css");
-    linkEl.addEventListener("load", onLoad);
-    linkEl.addEventListener("error", onError);
-    linkEl.setAttribute("href", chromeUri + kPathSuffix);
+    allPromises.push(new Promise(resolve => {
+      let onLoad = (e) => {
+        processCSSRules(linkEl.sheet);
+        resolve();
+        linkEl.removeEventListener("load", onLoad);
+        linkEl.removeEventListener("error", onError);
+      };
+      let onError = (e) => {
+        ok(false, "Loading " + linkEl.getAttribute("href") + " threw an error!");
+        resolve();
+        linkEl.removeEventListener("load", onLoad);
+        linkEl.removeEventListener("error", onError);
+      };
+      linkEl.addEventListener("load", onLoad);
+      linkEl.addEventListener("error", onError);
+      linkEl.setAttribute("type", "text/css");
+      let chromeUri = convertToCodeURI(uri.spec);
+      linkEl.setAttribute("href", chromeUri + kPathSuffix);
+    }));
     doc.head.appendChild(linkEl);
-  });
-
-  // We build a list of promises that get resolved when their respective
-  // files have loaded and produced no errors.
-  const kInContentCommonCSS = "chrome://global/skin/in-content/common.css";
-  let allPromises = uris.map((uri) => convertToCodeURI(uri.spec))
-                    .filter((uri) => uri !== kInContentCommonCSS);
-
-  // Make sure chrome://global/skin/in-content/common.css is loaded before other
-  // stylesheets in order to guarantee the --in-content variables can be
-  // correctly referenced.
-  if (allPromises.length !== uris.length) {
-    await loadCSS(kInContentCommonCSS);
   }
 
   // Wait for all the files to have actually loaded:
-  allPromises = allPromises.map(loadCSS);
   await Promise.all(allPromises);
 
   // Check if all the files referenced from CSS actually exist.
   for (let [image, references] of imageURIsToReferencesMap) {
     if (!chromeFileExists(image)) {
       for (let ref of references) {
         let ignored = false;
         for (let item of allowedImageReferences) {
--- a/caps/tests/mochitest/test_bug292789.html
+++ b/caps/tests/mochitest/test_bug292789.html
@@ -95,18 +95,13 @@ function loadImage(uri, expect, callback
     img.onload = success;
     img.expected = expect;
     img.callback = callback;
     img.src = uri;
     // document.getElementById("content").appendChild(img);
 }
 
 // Start off the script src test, and have it start the img tests when complete.
-// Temporarily allow content to access all resource:// URIs.
-SpecialPowers.pushPrefEnv({
-  set: [
-    ["security.all_resource_uri_content_accessible", true]
-  ]
-}, () => testScriptSrc(runImgTest));
+testScriptSrc(runImgTest);
 </script>
 </pre>
 </body>
 </html>
--- a/devtools/shared/platform/content/test/test_clipboard.html
+++ b/devtools/shared/platform/content/test/test_clipboard.html
@@ -10,47 +10,32 @@ https://bugzilla.mozilla.org/show_bug.cg
   <link rel="stylesheet" type="text/css"
         href="chrome://mochikit/content/tests/SimpleTest/test.css">
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 
 <script type="application/javascript">
 "use strict";
 var exports = {}
 </script>
+
+  <script type="application/javascript"
+	  src="resource://devtools/shared/platform/content/clipboard.js"></script>
+
 </head>
-<body onload="pre_do_tests()">
+<body onload="do_tests()">
 <script type="application/javascript">
 "use strict";
 
 const RESULT = "lark bunting";
 
 function doCopy(e) {
   console.log(e.isTrusted);
   copyString(RESULT);
 }
 
-async function pre_do_tests() {
-  // Temporarily allow content to access all resource:// URIs.
-  await SpecialPowers.pushPrefEnv({
-    set: [
-      ["security.all_resource_uri_content_accessible", true]
-    ]
-  });
-
-  // Load script.
-  await (() => new Promise((resolve) => {
-    var script = document.createElement("script");
-    script.onload = resolve;
-    script.src = "resource://devtools/shared/platform/content/clipboard.js";
-    document.head.appendChild(script);
-  }))();
-
-  do_tests();
-}
-
 function do_tests() {
   let elt = document.querySelector("#key");
   elt.addEventListener("keydown", doCopy);
 
   // Set the clipboard to something other than what we expect.
   SpecialPowers.clipboardCopyString("snowy owl");
 
   elt.focus();
--- a/dom/security/test/mixedcontentblocker/test_bug803225.html
+++ b/dom/security/test/mixedcontentblocker/test_bug803225.html
@@ -14,21 +14,18 @@ https://bugzilla.mozilla.org/show_bug.cg
   var counter = 0;
   var settings = [ [true, true], [true, false], [false, true], [false, false] ];
 
   var blockActive;
   var blockDisplay;
 
   //Cycle through 4 different preference settings.
   function changePrefs(callback) {
-    let newPrefs = [
-      ["security.all_resource_uri_content_accessible", true], // Temporarily allow content to access all resource:// URIs.
-      ["security.mixed_content.block_display_content", settings[counter][0]],
-      ["security.mixed_content.block_active_content", settings[counter][1]]
-    ];
+    let newPrefs = [["security.mixed_content.block_display_content", settings[counter][0]],
+                    ["security.mixed_content.block_active_content", settings[counter][1]]];
 
     SpecialPowers.pushPrefEnv({"set": newPrefs}, function () {
       blockDisplay = SpecialPowers.getBoolPref("security.mixed_content.block_display_content");
       blockActive = SpecialPowers.getBoolPref("security.mixed_content.block_active_content");
       counter++;
       callback();
     });
   }