Bug 945240 - Add test checking that URL.origin returns punycode r=smaug draft
authorValentin Gosu <valentin.gosu@gmail.com>
Wed, 17 May 2017 16:16:02 +0200
changeset 579642 ad0eb0bd1396e56f2cae77ff7e45d42b6049b3f9
parent 579641 e69cc9b2055b84026d5dc85885c282257abe83e8
child 579643 396d31c3f854e0e80832e577a1f5412da3d5e631
push id59315
push uservalentin.gosu@gmail.com
push dateWed, 17 May 2017 15:18:50 +0000
reviewerssmaug
bugs945240
milestone55.0a1
Bug 945240 - Add test checking that URL.origin returns punycode r=smaug MozReview-Commit-ID: 4YOu1blsiej
dom/url/tests/test_url.html
--- 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 {