Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: toolkit/components/passwordmgr/test/unit/xpcshell.toml
/**
* Test for LoginHelper.getLoginOrigin
*/
"use strict";
const TESTCASES = [
["javascript:void(0);", null],
["javascript:void(0);", "javascript:", true],
["data:text/html,example", null],
[
true,
],
[
],
[
],
];
for (let [input, expected, allowJS] of TESTCASES) {
let actual = LoginHelper.getLoginOrigin(input, allowJS);
Assert.strictEqual(actual, expected, "Checking: " + input);
}