mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
Bug 1380617 - Fix tests that use nsIURI.host expecting unicode domain name r=smaug,honzab
MozReview-Commit-ID: GKnbpc8GMb2
This commit is contained in:
parent
c58dcf6937
commit
3b95ce67d2
@ -337,8 +337,8 @@ var testcases = [ {
|
||||
inWhitelist: true,
|
||||
}, {
|
||||
input: "café.local",
|
||||
fixedURI: "http://café.local/",
|
||||
alternateURI: "http://www.café.local/",
|
||||
fixedURI: "http://xn--caf-dma.local/",
|
||||
alternateURI: "http://www.xn--caf-dma.local/",
|
||||
protocolChange: true
|
||||
}, {
|
||||
input: "47.6182,-122.830",
|
||||
|
@ -106,9 +106,7 @@ function receiveMessage(evt)
|
||||
}
|
||||
else
|
||||
{
|
||||
// We're receiving data from the Greek IDN name; since that TLD is
|
||||
// whitelisted for now, the domain we get isn't going to be punycoded.
|
||||
is(evt.origin, "http://sub1.παράδειγμα.δοκιμή", "wrong sender");
|
||||
is(evt.origin, "http://sub1.xn--hxajbheg2az3al.xn--jxalpdlp", "wrong sender");
|
||||
}
|
||||
|
||||
is(messages[state] + "-response", evt.data.split(" ")[0],
|
||||
|
@ -56,11 +56,11 @@ function run_test() {
|
||||
// http://lists.w3.org/Archives/Public/public-iri/2004Mar/0012.html
|
||||
var uri4 = ios.newURI("http://xn--jos-dma.example.net.ch/");
|
||||
do_check_eq(uri4.asciiHost, "xn--jos-dma.example.net.ch");
|
||||
do_check_eq(uri4.host, "jos\u00e9.example.net.ch");
|
||||
do_check_eq(uri4.displayHost, "jos\u00e9.example.net.ch");
|
||||
|
||||
var uri5 = round_trip(uri4);
|
||||
do_check_true(uri4.equals(uri5));
|
||||
do_check_eq(uri4.host, uri5.host);
|
||||
do_check_eq(uri4.displayHost, uri5.displayHost);
|
||||
do_check_eq(uri4.asciiHost, uri5.asciiHost);
|
||||
} finally {
|
||||
for (var pref of prefData) {
|
||||
|
@ -266,7 +266,7 @@ function add_simple_tests() {
|
||||
let cert = constructCertFromFile("bad_certs/idn-certificate.pem");
|
||||
Assert.ok(certOverrideService.hasMatchingOverride(uri.asciiHost, 8443, cert, {}, {}),
|
||||
"IDN certificate should have matching override using ascii host");
|
||||
Assert.ok(!certOverrideService.hasMatchingOverride(uri.host, 8443, cert, {}, {}),
|
||||
Assert.ok(!certOverrideService.hasMatchingOverride(uri.displayHost, 8443, cert, {}, {}),
|
||||
"IDN certificate should not have matching override using (non-ascii) host");
|
||||
run_next_test();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user