Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: js/xpconnect/tests/unit/xpcshell.toml
"use strict";
/**
* Test that the name of a sandbox contains the name of all principals.
*/
function test_sandbox_name() {
let names = [
];
let sandbox = Cu.Sandbox(names);
let fileName = Cu.evalInSandbox(
"(new Error()).fileName",
sandbox,
"latest" /*js version*/,
""/*file name*/
);
for (let name of names) {
Assert.ok(fileName.includes(name), `Name ${name} appears in ${fileName}`);
}
};
function run_test() {
test_sandbox_name();
}