Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/security/test/csp/browser.toml
"use strict";
const TEST_PATH_HTTP = getRootDirectory(gTestPath).replace(
);
const TEST_PATH_HTTPS = getRootDirectory(gTestPath).replace(
);
add_task(async function () {
await SpecialPowers.pushPrefEnv({
set: [["dom.security.https_first", false]],
});
await BrowserTestUtils.withNewTab(
TEST_PATH_HTTPS + "file_csp_meta_uir.html",
async function (browser) {
let newTabPromise = BrowserTestUtils.waitForNewTab(gBrowser, null, true);
BrowserTestUtils.synthesizeMouse(
"#mylink",
2,
2,
{ accelKey: true },
browser
);
let tab = await newTabPromise;
is(
tab.linkedBrowser.currentURI.scheme,
"https",
"Should have opened https page."
);
BrowserTestUtils.removeTab(tab);
}
);
});