Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: toolkit/components/satchel/test/unit/xpcshell.toml
/* 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
const { isOriginInList } = ChromeUtils.importESModule(
"resource://gre/modules/FirefoxRelay.sys.mjs"
);
// Helper to construct allow/deny lists like production:
function makeList(arr) {
return arr.map(domain => ({ domain }));
}
// Table: [listEntry, origin, expected]
const TESTS = [
];
add_task(async function test_isOriginInList() {
for (let [listEntry, origin, expected] of TESTS) {
let list = makeList([listEntry]);
let result = isOriginInList(list, origin);
Assert.equal(
result,
expected,
`isOriginInList([${listEntry}], ${origin}) === ${expected}`
);
}
});