☠☠ backed out by 76269370e3a0 ☠ ☠ | |
author | Matthew Noorenberghe <mozilla@noorenberghe.ca> |
Fri, 23 Aug 2019 18:22:00 +0000 | |
changeset 553388 | a8dc5f13dfcf8f6b54401818e1921803c427a029 |
parent 553387 | 7e2df056a778edae9665468db1db139102639c1d |
child 553389 | 06e0c353b3ef7b08c9bacc0f4c0eed30102de68c |
push id | 2165 |
push user | ffxbld-merge |
push date | Mon, 14 Oct 2019 16:30:58 +0000 |
treeherder | mozilla-release@0eae18af659f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | jaws |
bugs | 1569581 |
milestone | 70.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js | file | annotate | diff | comparison | revisions |
--- a/toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js +++ b/toolkit/components/passwordmgr/test/unit/test_isOriginMatching.js @@ -6,16 +6,27 @@ add_task(function test_isOriginMatching() { let testcases = [ // Index 0 holds the expected return value followed by arguments to isOriginMatching. [true, "http://example.com", "http://example.com"], [true, "http://example.com:8080", "http://example.com:8080"], [true, "https://example.com", "https://example.com"], [true, "https://example.com:8443", "https://example.com:8443"], + + // The formActionOrigin can be "javascript:" + [true, "javascript:", "javascript:"], + [false, "javascript:", "http://example.com"], + [false, "http://example.com", "javascript:"], + + // HTTP Auth. logins have a null formActionOrigin + [true, null, null], + [false, null, "http://example.com"], + [false, "http://example.com", null], + [false, "http://example.com", "http://mozilla.org"], [false, "http://example.com", "http://example.com:8080"], [false, "https://example.com", "http://example.com"], [false, "https://example.com", "https://mozilla.org"], [false, "http://example.com", "http://sub.example.com"], [false, "https://example.com", "https://sub.example.com"], [false, "http://example.com", "https://example.com:8443"], [false, "http://example.com:8080", "http://example.com:8081"], @@ -137,16 +148,28 @@ add_task(function test_isOriginMatching( { acceptDifferentSubdomains: false }, ], [ false, "http://sub.example.com", "http://sub.example.mozilla.com", { acceptDifferentSubdomains: false }, ], + + // HTTP Auth. logins have a null formActionOrigin + [ + false, + null, + "http://example.com", + { + acceptDifferentSubdomains: false, + acceptWildcardMatch: true, + schemeUpgrades: true, + }, + ], ]; for (let tc of testcases) { let expected = tc.shift(); Assert.strictEqual( LoginHelper.isOriginMatching(...tc), expected, "Check " + JSON.stringify(tc) );