зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1380617 - Fix tests that expect unicode encoding of hostname r=smaug
MozReview-Commit-ID: 6EGhUJmtjTc
This commit is contained in:
Родитель
3b95ce67d2
Коммит
953c52ffc5
|
@ -33,7 +33,7 @@ var tests = [
|
|||
},
|
||||
{
|
||||
name: "IDN subdomain",
|
||||
location: "http://sub1." + idnDomain + "/",
|
||||
location: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp/",
|
||||
effectiveHost: "sub1." + idnDomain
|
||||
},
|
||||
{
|
||||
|
|
|
@ -240,7 +240,7 @@ add_task(async function test_bookmarks() {
|
|||
checkOnCreated(results[3].id, bookmarkGuids.unfiledGuid, 0, "EFF", "http://eff.org/", results[3].dateAdded);
|
||||
checkOnCreated(results[2].id, bookmarkGuids.unfiledGuid, 0, "Mozilla Folder", undefined, results[2].dateAdded);
|
||||
checkOnCreated(results[1].id, bookmarkGuids.unfiledGuid, 0, "Example", "http://example.org/", results[1].dateAdded);
|
||||
checkOnCreated(results[0].id, bookmarkGuids.unfiledGuid, 0, "MØzillä", "http://møzîllä.örg/", results[0].dateAdded);
|
||||
checkOnCreated(results[0].id, bookmarkGuids.unfiledGuid, 0, "MØzillä", "http://xn--mzll-ooa1dud.xn--rg-eka/", results[0].dateAdded);
|
||||
|
||||
for (let result of results) {
|
||||
if (result.title !== "Mozilla Folder") {
|
||||
|
|
|
@ -82,9 +82,9 @@ add_task(async function test_principal_permissions() {
|
|||
scope: 'https://example.com/',
|
||||
originAttributes: '^userContextId=1',
|
||||
}, {
|
||||
scope: 'https://блог.фанфрог.рф/',
|
||||
scope: 'https://xn--90aexm.xn--80ag3aejvc.xn--p1ai/',
|
||||
}, {
|
||||
scope: 'https://блог.фанфрог.рф/',
|
||||
scope: 'https://xn--90aexm.xn--80ag3aejvc.xn--p1ai/',
|
||||
originAttributes: '^userContextId=1',
|
||||
}];
|
||||
for (let props of testProps) {
|
||||
|
|
|
@ -29,7 +29,7 @@ function receiveMessage(evt)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (domain !== "sub1.παράδειγμα.δοκιμή")
|
||||
if (domain !== "sub1.xn--hxajbheg2az3al.xn--jxalpdlp")
|
||||
message += " wrong-initial-domain(" + domain + ")";
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
<!--
|
||||
|
||||
TODO: after bug 945240 this test is no longer relevant. Should fix.
|
||||
|
||||
This testing all gets a bit complicated here; the problem is that our
|
||||
document.domain implementation will do a suffix comparison of the value to which
|
||||
it's being set against the current URI's base domain (where "base domain" is
|
||||
|
|
|
@ -36,7 +36,7 @@ function receiveMessage(evt)
|
|||
ok(evt.isTrusted === false, "shouldn't have been a trusted event");
|
||||
}
|
||||
|
||||
is(evt.origin, "http://sub1.ält.example.org:8000",
|
||||
is(evt.origin, "http://sub1.xn--lt-uia.example.org:8000",
|
||||
"wrong origin -- IDN issue, perhaps?");
|
||||
|
||||
is(evt.data, "idn-response", "unexpected test result");
|
||||
|
|
|
@ -268,120 +268,100 @@ var tests =
|
|||
{
|
||||
args: ["PASS", "http://sub1.παράδειγμα.δοκιμή"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.παράδειγμα.δοκιμή:80"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.παράδειγμα.δοκιμή:80/"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.παράδειγμα.δοκιμή:80/foobar"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
// 40
|
||||
{
|
||||
args: ["PASS", "http://sub1.παράδειγμα.δοκιμή/foobar"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp:80"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp:80/"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp:80/foo"],
|
||||
source: "idnKidWhitelist",
|
||||
returnOrigin: "http://sub1.παράδειγμα.δοκιμή"
|
||||
returnOrigin: "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp"
|
||||
},
|
||||
// 45
|
||||
{
|
||||
args: ["PASS", "http://sub1.exaмple.test"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.exaмple.test:80"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.exaмple.test:80/"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.exaмple.test/"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.exaмple.test/foobar"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
// 50
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--exaple-kqf.test"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--exaple-kqf.test:80"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--exaple-kqf.test:80/"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--exaple-kqf.test/"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
{
|
||||
args: ["PASS", "http://sub1.xn--exaple-kqf.test/foobar"],
|
||||
source: "idnKidNoWhitelist",
|
||||
returnOrigin: "http://sub1.exaмple.test",
|
||||
|
||||
hasWrongReturnOriginBug: true
|
||||
returnOrigin: "http://sub1.xn--exaple-kqf.test",
|
||||
},
|
||||
// 55
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ add_task(async function test_storage_setLoginSavingEnabled_nonascii_IDN_is_suppo
|
|||
await LoginTestUtils.reloadData();
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
|
||||
|
||||
LoginTestUtils.clearData();
|
||||
|
||||
|
@ -163,7 +163,7 @@ add_task(async function test_storage_setLoginSavingEnabled_nonascii_IDN_is_suppo
|
|||
await LoginTestUtils.reloadData();
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(hostname), false);
|
||||
Assert.equal(Services.logins.getLoginSavingEnabled(encoding), false);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [hostname]);
|
||||
LoginTestUtils.assertDisabledHostsEqual(Services.logins.getAllDisabledHosts(), [encoding]);
|
||||
|
||||
LoginTestUtils.clearData();
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче