Bug 945240 - Add test checking that URL.origin returns punycode r=smaug
MozReview-Commit-ID: 4YOu1blsiej
--- a/dom/url/tests/test_url.html
+++ b/dom/url/tests/test_url.html
@@ -222,16 +222,47 @@
base: undefined,
error: false,
protocol: 'foo:',
pathname: 'bar',
search: '?what',
hash: '#yeah',
skip_setters: false,
},
+
+ { url: 'http://sub2.xn--lt-uia.mochi.test:8888/foo',
+ base: undefined,
+ error: false,
+ href: 'http://sub2.xn--lt-uia.mochi.test:8888/foo',
+ origin: 'http://sub2.xn--lt-uia.mochi.test:8888',
+ protocol: 'http:',
+ username: '',
+ password: '',
+ host: 'sub2.xn--lt-uia.mochi.test:8888',
+ hostname: 'sub2.xn--lt-uia.mochi.test',
+ port: '8888',
+ pathname: '/foo',
+ search: '',
+ hash: ''
+ },
+ { url: 'http://sub2.ält.mochi.test:8888/foo',
+ base: undefined,
+ error: false,
+ href: 'http://sub2.xn--lt-uia.mochi.test:8888/foo',
+ origin: 'http://sub2.xn--lt-uia.mochi.test:8888',
+ protocol: 'http:',
+ username: '',
+ password: '',
+ host: 'sub2.xn--lt-uia.mochi.test:8888',
+ hostname: 'sub2.xn--lt-uia.mochi.test',
+ port: '8888',
+ pathname: '/foo',
+ search: '',
+ hash: ''
+ },
];
while(tests.length) {
var test = tests.shift();
var error = false;
var url;
try {