Commit 263d5552 authored by Mark Banner's avatar Mark Banner
Browse files

Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import',...

Bug 1608272 - Remove 'this' as the second argument to 'ChromeUtils.import', use object destructuring instead (test-only changes). r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D104683
parent 2ec7c868
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@ module.exports = {
        "browser/components/customizableui/test/browser_1042100_default_placements_update.js",
        "browser/components/customizableui/test/browser_1096763_seen_widgets_post_reset.js",
        "browser/components/customizableui/test/browser_1161838_inserted_new_default_buttons.js",
        "browser/components/customizableui/test/browser_1686523_hide_home_button.js",
        "browser/components/customizableui/test/browser_989338_saved_placements_not_resaved.js",
        "browser/components/customizableui/test/browser_currentset_post_reset.js",
        "browser/components/customizableui/test/browser_panel_keyboard_navigation.js",
+3 −1
Original line number Diff line number Diff line
@@ -11,7 +11,9 @@ Services.scriptloader.loadSubScript(
  this
);

ChromeUtils.import("resource://testing-common/TelemetryTestUtils.jsm", this);
const { TelemetryTestUtils } = ChromeUtils.import(
  "resource://testing-common/TelemetryTestUtils.jsm"
);

registerCleanupFunction(() => {
  Services.prefs.clearUserPref("browser.display.document_color_use");
+2 −3
Original line number Diff line number Diff line
@@ -2,9 +2,8 @@
 * http://creativecommons.org/publicdomain/zero/1.0/
 */

ChromeUtils.import(
  "resource://testing-common/CustomizableUITestUtils.jsm",
  this
const { CustomizableUITestUtils } = ChromeUtils.import(
  "resource://testing-common/CustomizableUITestUtils.jsm"
);
let gCUITestUtils = new CustomizableUITestUtils(window);

+7 −8
Original line number Diff line number Diff line
@@ -34,9 +34,6 @@ Services.scriptloader.loadSubScript(
  this
);

/* import-globals-from ../general/head.js */
Services.scriptloader.loadSubScript(head_base + "head.js", this);

function getThisFrameSubMenu(base_menu) {
  if (AppConstants.NIGHTLY_BUILD) {
    let osPidItem = ["context-frameOsPid", false];
@@ -1373,11 +1370,13 @@ add_task(async function test_dom_full_screen() {
      maybeScreenshotsPresent: true,
      shiftkey: true,
      async preCheckContextMenuFn() {
        await pushPrefs(
        await SpecialPowers.pushPrefEnv({
          set: [
            ["full-screen-api.allow-trusted-requests-only", false],
            ["full-screen-api.transition-duration.enter", "0 0"],
          ["full-screen-api.transition-duration.leave", "0 0"]
        );
            ["full-screen-api.transition-duration.leave", "0 0"],
          ],
        });
        await SpecialPowers.spawn(
          gBrowser.selectedBrowser,
          [],
+3 −1
Original line number Diff line number Diff line
ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm", this);
const { XPCOMUtils } = ChromeUtils.import(
  "resource://gre/modules/XPCOMUtils.jsm"
);

ChromeUtils.defineModuleGetter(
  this,
Loading