Skip to content

Commit

Permalink
[URL] Update url-setters-stripping.any.js
Browse files Browse the repository at this point in the history
  • Loading branch information
karwa committed Jan 25, 2022
1 parent 6e33a92 commit d4f2ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions url/url-setters-stripping.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ for(const scheme of ["https", "wpt++"]) {
["trailing", "test" + (scheme === "https" ? cpString : encodeURIComponent(cpString)), "test" + String.fromCodePoint(i)]
]) {
test(() => {
const expected = i === 0x00 ? "host" : stripped ? "test" : expectedPart;
const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart;
const url = urlRecord(scheme);
url.host = input;
assert_equals(url.host, expected + ":8000", "property");
assert_equals(url.href, urlString({ scheme, host: expected }), "href");
}, `Setting host with ${type} ${cpReference} (${scheme}:)`);

test(() => {
const expected = i === 0x00 ? "host" : stripped ? "test" : expectedPart;
const expected = i === 0x00 || (scheme === "https" && i === 0x1F) ? "host" : stripped ? "test" : expectedPart;
const url = urlRecord(scheme);
url.hostname = input;
assert_equals(url.hostname, expected, "property");
Expand Down

0 comments on commit d4f2ce0

Please sign in to comment.