Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
-
CI results over the last 21 days3,526Runs99.97%Pass0Failures1Timeouts0Crashes0Skips
Runs with issues per day (up to 0.2%) Oct 22Nov 11- Timeouts
- This test runs only with pattern: os != 'android'
- Manifest: browser/components/enterprisepolicies/tests/xpcshell/xpcshell.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
const { NetUtil } = ChromeUtils.importESModule(
"resource://gre/modules/NetUtil.sys.mjs"
);
function getHeaderForURL(url) {
let channel = NetUtil.newChannel({
uri: url,
loadUsingSystemPrincipal: true,
}).QueryInterface(Ci.nsIHttpChannel);
Services.obs.notifyObservers(channel, "http-on-modify-request");
try {
return channel.getRequestHeader("X-GoogApps-Allowed-Domains");
} catch (e) {
return null;
}
}
add_task(async function test_allowed_domains_for_apps() {
await setupPolicyEngineWithJson({
policies: {
AllowedDomainsForApps: "example.org",
},
});
});