In a following patch, all DevTools moz.build files will use DevToolsModules to install JS modules at a path that corresponds directly to their source tree location. Here we rewrite all require and import calls to match the new location that these files are installed to.
21 lines
511 B
JavaScript
21 lines
511 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
// Test require
|
|
|
|
// Ensure that DevtoolsLoader.require doesn't spawn multiple
|
|
// loader/modules when early cached
|
|
function testBug1091706() {
|
|
let loader = new DevToolsLoader();
|
|
let require = loader.require;
|
|
|
|
let color1 = require("devtools/shared/css-color");
|
|
let color2 = require("devtools/shared/css-color");
|
|
|
|
do_check_true(color1 === color2);
|
|
}
|
|
|
|
function run_test() {
|
|
testBug1091706();
|
|
}
|