summaryrefslogtreecommitdiffstats
path: root/devtools/client/shared/test/browser_require_raw.js
blob: 64d48f2eb15b59fbdcc77e168f4c00c046e4bb58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */

"use strict";

const { BrowserLoader } = ChromeUtils.importESModule(
  "resource://devtools/shared/loader/browser-loader.sys.mjs"
);

const { require: browserRequire } = BrowserLoader({
  baseURI: "resource://devtools/client/shared/",
  window,
});

const variableFileContents = browserRequire(
  "raw!chrome://devtools/skin/variables.css"
);

function test() {
  ok(!!variableFileContents.length, "raw browserRequire worked");
  delete window.getBrowserLoaderForWindow;
  finish();
}