browser/tools/mozscreenshots/mozscreenshots/extension/configurations/LightweightThemes.jsm
author Kris Maglione <maglione.k@gmail.com>
Thu, 21 Mar 2019 13:06:24 -0700
changeset 466970 e289c1b047d7e2c02845decf7618f31bf145dea6
parent 455795 6b56696d713a7f7858f16235e37baa8307e73b49
child 481370 c577840a8063252f29870121b2ce8e01240db032
permissions -rw-r--r--
Bug 1525762: Part 1k - Update mozscreenshots to use AddonManager rather than LightweightThemeManager. r=MattN

/* 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/. */

"use strict";

var EXPORTED_SYMBOLS = ["LightweightThemes"];

const {AddonManager} = ChromeUtils.import("resource://gre/modules/AddonManager.jsm");

var LightweightThemes = {
  init(libDir) {
  },

  configurations: {
    noLWT: {
      selectors: [],
      async applyConfig() {
        let addon = await AddonManager.getAddonByID("default-theme@mozilla.org");
        await addon.enable();
      },
    },

    compactLight: {
      selectors: [],
      async applyConfig() {
        let addon = await AddonManager.getAddonByID("firefox-compact-light@mozilla.org");
        await addon.enable();
      },
    },

    compactDark: {
      selectors: [],
      async applyConfig() {
        let addon = await AddonManager.getAddonByID("firefox-compact-dark@mozilla.org");
        await addon.enable();
      },
    },
  },
};