Bug 1432992, part 2 - Manually remove some empty blocks. r=florian draft
authorAndrew McCreight <continuation@gmail.com>
Thu, 25 Jan 2018 16:52:25 -0800
changeset 751789 f5789bf6490f06ff36c04ff144fa653311bb47ef
parent 751788 86aaa5bf19fecbd7557abd619a82cf4ed4adf304
child 751790 74de512cb8d644ba9d6d8279596df3d24f9c7bb6
push id98047
push userbmo:continuation@gmail.com
push dateTue, 06 Feb 2018 22:02:37 +0000
reviewersflorian
bugs1432992
milestone60.0a1
Bug 1432992, part 2 - Manually remove some empty blocks. r=florian Also, remove a now-obsolete comment from placesOverlay.xul and remove some now-empty XPCShell test head files. MozReview-Commit-ID: 6kKVQu8FAL3
browser/components/places/content/placesOverlay.xul
dom/events/test/test_bug415498.xul
netwerk/test/unit_ipc/head_cc.js
netwerk/test/unit_ipc/xpcshell.ini
testing/mochitest/browser-harness.xul
testing/mochitest/harness.xul
testing/specialpowers/content/SpecialPowersObserver.jsm
testing/specialpowers/content/SpecialPowersObserverAPI.js
testing/talos/talos/pageloader/chrome/MozillaFileLogger.js
testing/talos/talos/pageloader/chrome/pageloader.js
tools/code-coverage/tests/xpcshell/head.js
tools/code-coverage/tests/xpcshell/xpcshell.ini
--- a/browser/components/places/content/placesOverlay.xul
+++ b/browser/components/places/content/placesOverlay.xul
@@ -13,19 +13,16 @@
          xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
          xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
   <script type="application/javascript"
           src="chrome://global/content/globalOverlay.js"/>
   <script type="application/javascript"
           src="chrome://browser/content/utilityOverlay.js"/>
   <script type="application/javascript"><![CDATA[
-    // TODO: Bug 406371.
-    // A bunch of browser code depends on us defining these, sad but true :(
-
     ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
     ChromeUtils.import("resource://gre/modules/PlacesUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesUIUtils", "resource:///modules/PlacesUIUtils.jsm");
     ChromeUtils.defineModuleGetter(window,
       "PlacesTransactions", "resource://gre/modules/PlacesTransactions.jsm");
   ]]></script>
   <script type="application/javascript"
--- a/dom/events/test/test_bug415498.xul
+++ b/dom/events/test/test_bug415498.xul
@@ -17,19 +17,16 @@ https://bugzilla.mozilla.org/show_bug.cg
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=415498">Mozilla Bug 415498</a>
 
   <p id="display"></p>
 
   <pre id="test">
   <script class="testbody" type="application/javascript"><![CDATA[
 
     /** Test for Bug 415498 **/
-    if (Cc === undefined) {
-    }
-
     SimpleTest.waitForExplicitFinish();
 
     var gTestsIterator;
     var gConsole;
     var gConsoleListener;
     var gMessages = [];
 
     function init() {
deleted file mode 100644
--- a/netwerk/test/unit_ipc/xpcshell.ini
+++ b/netwerk/test/unit_ipc/xpcshell.ini
@@ -1,10 +1,10 @@
 [DEFAULT]
-head = head_channels_clone.js head_cc.js
+head = head_channels_clone.js
 skip-if = toolkit == 'android'
 support-files =
   child_channel_id.js
   !/netwerk/test/unit/test_XHR_redirects.js
   !/netwerk/test/unit/test_bug248970_cookie.js
   !/netwerk/test/unit/test_bug528292.js
   !/netwerk/test/unit/test_cache-entry-id.js
   !/netwerk/test/unit/test_cache_jar.js
--- a/testing/mochitest/browser-harness.xul
+++ b/testing/mochitest/browser-harness.xul
@@ -58,19 +58,16 @@
     }
 
     a {
       color: blue;
       text-decoration: underline;
     }
   ]]></style>
   <script type="application/javascript"><![CDATA[
-    if (Cc === undefined) {
-    }
-
     var gConfig;
 
     var gDumper = {
       get fileLogger() {
         let logger = null;
         if (gConfig.logFile) {
           try {
             logger = new MozillaFileLogger(gConfig.logFile)
--- a/testing/mochitest/harness.xul
+++ b/testing/mochitest/harness.xul
@@ -22,19 +22,16 @@
   <script type="application/javascript"
           src="chrome://mochikit/content/chunkifyTests.js" />
   <script type="application/javascript"
           src="chrome://mochikit/content/manifestLibrary.js" />
   <script type="text/javascript"
           src="chrome://mochikit/content/tests/SimpleTest/setup.js" />
   <script type="application/javascript"><![CDATA[
 
-if (Cc === undefined) {
-}
-
 function loadTests()
 {
   window.removeEventListener("load", loadTests, false);
   getTestList({}, linkAndHookup);
 }
  
 function linkAndHookup(links) {
   // load server.js in so we can share template functions
--- a/testing/specialpowers/content/SpecialPowersObserver.jsm
+++ b/testing/specialpowers/content/SpecialPowersObserver.jsm
@@ -12,19 +12,16 @@
 /* import-globals-from SpecialPowersObserverAPI.js */
 
 var EXPORTED_SYMBOLS = ["SpecialPowersObserver", "SpecialPowersObserverFactory"];
 
 ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 Components.utils.importGlobalProperties(["File"]);
 
-if (typeof(Cc) == "undefined") {
-}
-
 const CHILD_SCRIPT = "chrome://specialpowers/content/specialpowers.js";
 const CHILD_SCRIPT_API = "chrome://specialpowers/content/specialpowersAPI.js";
 const CHILD_LOGGER_SCRIPT = "chrome://specialpowers/content/MozillaLogger.js";
 
 
 // Glue to add in the observer API to this object.  This allows us to share code with chrome tests
 var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
                        .getService(Components.interfaces.mozIJSSubScriptLoader);
--- a/testing/specialpowers/content/SpecialPowersObserverAPI.js
+++ b/testing/specialpowers/content/SpecialPowersObserverAPI.js
@@ -8,22 +8,16 @@ ChromeUtils.import("resource://gre/modul
 
 XPCOMUtils.defineLazyModuleGetters(this, {
   ExtensionData: "resource://gre/modules/Extension.jsm",
   ExtensionTestCommon: "resource://testing-common/ExtensionTestCommon.jsm",
   NetUtil: "resource://gre/modules/NetUtil.jsm",
   Services: "resource://gre/modules/Services.jsm",
 });
 
-if (typeof(Ci) == "undefined") {
-}
-
-if (typeof(Cc) == "undefined") {
-}
-
 this.SpecialPowersError = function(aMsg) {
   Error.call(this);
   // let {stack} = new Error();
   this.message = aMsg;
   this.name = "SpecialPowersError";
 };
 SpecialPowersError.prototype = Object.create(Error.prototype);
 
--- a/testing/talos/talos/pageloader/chrome/MozillaFileLogger.js
+++ b/testing/talos/talos/pageloader/chrome/MozillaFileLogger.js
@@ -4,20 +4,16 @@
 
 // double logging to account for normal mode and ipc mode (mobile_profile only)
 // Ideally we would remove the dump() and just do ipc logging
 function dumpLog(msg) {
   dump(msg);
   MozillaFileLogger.log(msg);
 }
 
-
-if (Cc === undefined) {
-}
-
 const FOSTREAM_CID = "@mozilla.org/network/file-output-stream;1";
 const LF_CID = "@mozilla.org/file/local;1";
 
 // File status flags. It is a bitwise OR of the following bit flags.
 // Only one of the first three flags below may be used.
 const PR_READ_ONLY    = 0x01; // Open for reading only.
 const PR_WRITE_ONLY   = 0x02; // Open for writing only.
 const PR_READ_WRITE   = 0x04; // Open for reading and writing.
--- a/testing/talos/talos/pageloader/chrome/pageloader.js
+++ b/testing/talos/talos/pageloader/chrome/pageloader.js
@@ -1,20 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from report.js */
 /* eslint mozilla/avoid-Date-timing: "off" */
 
-try {
-  if (Cc === undefined) {
-  }
-} catch (ex) {}
-
 ChromeUtils.import("resource://gre/modules/Services.jsm");
 ChromeUtils.import("resource://gre/modules/E10SUtils.jsm");
 
 var NUM_CYCLES = 5;
 var numPageCycles = 1;
 
 var numRetries = 0;
 var maxRetries = 3;
deleted file mode 100644
--- a/tools/code-coverage/tests/xpcshell/head.js
+++ /dev/null
@@ -1,4 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
--- a/tools/code-coverage/tests/xpcshell/xpcshell.ini
+++ b/tools/code-coverage/tests/xpcshell/xpcshell.ini
@@ -1,5 +1,2 @@
-[DEFAULT]
-head = head.js
-
 [test_basic.js]
 [test_basic_child_and_parent.js]