| Index: qunit/tests/url.js |
| diff --git a/qunit/tests/url.js b/qunit/tests/url.js |
| index 735ffbb2b06ddd59131c8b2727145da8ee7362d7..022f14e432f06997b868876da11dc3ec5f876fc6 100644 |
| --- a/qunit/tests/url.js |
| +++ b/qunit/tests/url.js |
| @@ -18,34 +18,12 @@ |
| "use strict"; |
| { |
| - let {extractHostFromFrame, |
| + const {extractHostFromFrame, |
|
geo
2018/09/06 10:24:10
I know that this change is not related to this par
Sebastian Noack
2018/09/06 13:43:21
I agree, but while on it, it also seems unnecessar
geo
2018/09/06 20:10:47
You're right. I was so focused on that let and con
|
| isThirdParty} = require("../../lib/url"); |
| + const {platform} = require("info"); |
| QUnit.module("URL/host tools"); |
| - test("Extracting hostname from URL", () => |
| - { |
| - function testURLHostname(url, expectedHostname, message) |
| - { |
| - equal(new URL(url).hostname, expectedHostname, message); |
| - } |
| - |
| - testURLHostname("http://example.com/foo", "example.com", "with path"); |
| - testURLHostname("http://example.com/?foo=bar", "example.com", "with query"); |
| - testURLHostname("http://example.com/#top", "example.com", "with hash"); |
| - testURLHostname("http://example.com:8080/", "example.com", "with port"); |
| - testURLHostname("http://user:password@example.com/", "example.com", |
| - "with auth credentials"); |
| - testURLHostname("http://xn--f-1gaa.com/", "xn--f-1gaa.com", |
| - "with punycode"); |
| - testURLHostname("about:blank", "", "about:blank"); |
| - testURLHostname("data:text/plain,foo", "", "data: URL"); |
| - testURLHostname("ftp://example.com/", "example.com", "ftp: URL"); |
| - testURLHostname("http://1.2.3.4:8000/", "1.2.3.4", "IPv4 address"); |
| - testURLHostname("http://[2001:db8:85a3::8a2e:370:7334]/", |
| - "[2001:db8:85a3::8a2e:370:7334]", "IPv6 address"); |
| - }); |
| - |
| test("Extracting hostname from frame", () => |
| { |
| function testFrameHostname(hierarchy, expectedHostname, message) |
| @@ -67,8 +45,17 @@ |
| "example.com", "about:blank, hostname in ancestor"); |
| testFrameHostname(["about:blank", "about:blank"], "", |
| "about:blank, no hostname"); |
| - testFrameHostname(["http://xn--f-1gaa.com/"], "xn--f-1gaa.com", |
| - "with punycode"); |
| + // Currently there are two bugs in Microsoft Edge (EdgeHTML 17.17134) |
|
Sebastian Noack
2018/09/06 13:43:21
Nit: It might read better with a blank line above.
geo
2018/09/06 20:10:47
Done.
|
| + // that would make this two assertions fail, |
| + // so for now we are not running them on this platform. |
| + // See: https://issues.adblockplus.org/ticket/6913 |
|
Sebastian Noack
2018/09/06 13:43:21
Can we link to the Microsoft Edge bugs directly, r
geo
2018/09/06 20:10:47
Done.
|
| + if (platform != "edgehtml") |
| + { |
| + testFrameHostname(["http://xn--f-1gaa.com/"], "xn--f-1gaa.com", |
| + "with punycode"); |
| + testFrameHostname(["http://user:password@example.com/"], "example.com", |
| + "with auth credentials"); |
| + } |
| }); |
| test("Third-party checks", () => |