Revert "Use the same parse processing at contractor of URL with setters (#1549)"

Right now every instance of URL which has a basePath passed will share
the same instance of parts, so a change to one of them will change them
all.

https://github.com/denoland/deno/pull/1549#issuecomment-455896081

This reverts commit 9e1f5ccb8b.
This commit is contained in:
Ryan Dahl 2019-01-20 21:31:13 -05:00
parent 106fe1f762
commit 7eb74ba0d6
2 changed files with 17 additions and 57 deletions

View file

@ -31,19 +31,6 @@ test(function urlParsing() {
);
});
test(function constractorParsing() {
const url = new URL("http://どめいん.com/ぱす?きー=ばりゅー#はっしゅ");
const { host, pathname, search, hash } = url;
url.host = "どめいん.com";
url.pathname = "/ぱす";
url.search = "?きー=ばりゅー";
url.hash = "#はっしゅ";
assertEqual(host, url.host);
assertEqual(pathname, url.pathname);
assertEqual(search, url.search);
assertEqual(hash, url.hash);
});
test(function urlModifications() {
const url = new URL(
"https://foo:bar@baz.qat:8000/qux/quux?foo=bar&baz=12#qat"