зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1824491 - Convert browser/actors/LightweightThemeChild.jsm to ESM. r=kpatenio
Differential Revision: https://phabricator.services.mozilla.com/D174521
This commit is contained in:
Родитель
2c05b164e2
Коммит
7d39526f2e
|
@ -2,14 +2,10 @@
|
|||
* 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 = ["LightweightThemeChild"];
|
||||
|
||||
/**
|
||||
* LightweightThemeChild forwards theme data to in-content pages.
|
||||
*/
|
||||
class LightweightThemeChild extends JSWindowActorChild {
|
||||
export class LightweightThemeChild extends JSWindowActorChild {
|
||||
constructor() {
|
||||
super();
|
||||
this._initted = false;
|
|
@ -13,7 +13,7 @@ with Files("ContentSearch*.sys.mjs"):
|
|||
with Files("AboutReaderParent.jsm"):
|
||||
BUG_COMPONENT = ("Toolkit", "Reader Mode")
|
||||
|
||||
with Files("LightweightThemeChild.jsm"):
|
||||
with Files("LightweightThemeChild.sys.mjs"):
|
||||
BUG_COMPONENT = ("WebExtensions", "Themes")
|
||||
|
||||
with Files("PageInfoChild.sys.mjs"):
|
||||
|
@ -64,7 +64,7 @@ FINAL_TARGET_FILES.actors += [
|
|||
"EncryptedMediaParent.sys.mjs",
|
||||
"FormValidationChild.sys.mjs",
|
||||
"FormValidationParent.sys.mjs",
|
||||
"LightweightThemeChild.jsm",
|
||||
"LightweightThemeChild.sys.mjs",
|
||||
"LinkHandlerChild.sys.mjs",
|
||||
"LinkHandlerParent.sys.mjs",
|
||||
"PageInfoChild.sys.mjs",
|
||||
|
|
|
@ -558,7 +558,7 @@ let JSWINDOWACTORS = {
|
|||
|
||||
LightweightTheme: {
|
||||
child: {
|
||||
moduleURI: "resource:///actors/LightweightThemeChild.jsm",
|
||||
esModuleURI: "resource:///actors/LightweightThemeChild.sys.mjs",
|
||||
events: {
|
||||
pageshow: { mozSystemGroup: true },
|
||||
DOMContentLoaded: {},
|
||||
|
|
|
@ -207,7 +207,7 @@ add_task(async function test_per_window_ntp_theme() {
|
|||
async ({ theme, isBrightText, winId }) => {
|
||||
let win = Services.wm.getOuterWindowWithId(winId);
|
||||
win.NewTabPagePreloading.removePreloadedBrowser(win);
|
||||
// These pages were initially chosen because LightweightThemeChild.jsm
|
||||
// These pages were initially chosen because LightweightThemeChild.sys.mjs
|
||||
// treats them specially.
|
||||
for (let url of ["about:newtab", "about:home"]) {
|
||||
info("Opening url: " + url);
|
||||
|
|
Загрузка…
Ссылка в новой задаче