mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-17 15:25:52 +00:00
Bug 1425267 fix url param schema for launchWebAuthFlow, r=rpl
This commit is contained in:
parent
b864e4d18d
commit
cd4131b5bf
@ -162,7 +162,7 @@
|
||||
"name": "details",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"url": {"type": "string"},
|
||||
"url": {"$ref": "manifest.HttpURL"},
|
||||
"interactive": {"type": "boolean", "optional": true}
|
||||
}
|
||||
},
|
||||
@ -185,7 +185,7 @@
|
||||
"description": "Generates a redirect URL to be used in |launchWebAuthFlow|.",
|
||||
"parameters": [
|
||||
{
|
||||
"name": " path",
|
||||
"name": "path",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"optional": true,
|
||||
|
@ -77,8 +77,13 @@ add_task(async function test_badAuthURI() {
|
||||
],
|
||||
},
|
||||
async background() {
|
||||
await browser.test.assertRejects(browser.identity.launchWebAuthFlow({interactive: true, url: "foobar"}),
|
||||
"details.url is invalid", "invalid param url");
|
||||
for (let url of ["foobar", "about:addons", "about:blank", "ftp://example.com/test"]) {
|
||||
await browser.test.assertThrows(
|
||||
() => { browser.identity.launchWebAuthFlow({interactive: true, url}); },
|
||||
/Type error for parameter details/,
|
||||
"details.url is invalid");
|
||||
}
|
||||
|
||||
browser.test.sendMessage("done");
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user