Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'win' && socketprocess_networking && fission OR os == 'mac' && socketprocess_networking && fission OR os == 'mac' && debug OR os == 'linux' && socketprocess_networking
- Manifest: toolkit/components/extensions/test/xpcshell/xpcshell-remote.toml includes toolkit/components/extensions/test/xpcshell/xpcshell-common.toml
- Manifest: toolkit/components/extensions/test/xpcshell/xpcshell.toml includes toolkit/components/extensions/test/xpcshell/xpcshell-common.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
AddonTestUtils.init(this);
add_task(async function test_invalid_urls_in_webRequest_filter() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
},
background() {
browser.webRequest.onBeforeRequest.addListener(() => {}, {
urls: ["htt:/example.com/*"],
types: ["main_frame"],
});
},
});
let { messages } = await promiseConsoleOutput(async () => {
await extension.startup();
await extension.unload();
});
AddonTestUtils.checkMessages(
messages,
{
expected: [
{
message: /ExtensionError: Invalid url pattern: htt:\/example.com\/*/,
},
],
},
true
);
});