Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
Services.scriptloader.loadSubScript(
this
);
add_task(
async function test_site_on_denyList_does_not_show_Relay_to_signed_in_browser() {
const sandbox = stubFxAccountsToSimulateSignedIn();
// Set up denylist for "example.org"
const rsSandbox = await stubRemoteSettingsDenyList([
{ domain: "example.org" },
]);
for (const scenario of ["available", "offered", "enabled", "disabled"]) {
await setupRelayScenario(scenario);
await BrowserTestUtils.withNewTab(
{
gBrowser,
url: TEST_URL_PATH,
},
async function (browser) {
const popup = document.getElementById("PopupAutoComplete");
await openACPopup(popup, browser, "#form-basic-username");
const relayItem = getRelayItemFromACPopup(popup);
Assert.ok(
!relayItem,
"Relay item SHOULD NOT be present in the autocomplete popup when the site is on the deny-list, even if the user is signed into the browser."
);
}
);
}
sandbox.restore();
rsSandbox.restore();
}
);