1
0
Fork 0
firefox/toolkit/components/mozprotocol/tests/browser_mozprotocol.js
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

23 lines
689 B
JavaScript

// Check that entering moz://a into the address bar directs us to a new url
add_task(async function () {
let path = getRootDirectory(gTestPath).substring(
"chrome://mochitests/content/".length
);
await SpecialPowers.pushPrefEnv({
set: [
[
"toolkit.mozprotocol.url",
`https://example.com/${path}mozprotocol.html`,
],
],
});
await BrowserTestUtils.withNewTab("about:blank", async function () {
BrowserTestUtils.startLoadingURIString(gBrowser, "moz://a");
await BrowserTestUtils.waitForLocationChange(
gBrowser,
`https://example.com/${path}mozprotocol.html`
);
ok(true, "Made it to the expected page");
});
});