summaryrefslogtreecommitdiff
path: root/test/parallel/test-whatwg-url-properties.js
Commit message (Collapse)AuthorAgeFilesLines
* url: make urlToOptions() handle IPv6 literalsLuigi Pinca2018-04-101-0/+3
| | | | | | | | Strip the enclosing square brackets from the parsed hostname. PR-URL: https://github.com/nodejs/node/pull/19720 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* test: mitigate RegEx exceeding 80 charsAditya Anand2017-08-071-4/+8
| | | | | | | | | | | | Format commit wrapping lines containing RegEx and exceeding 80 chars. PR-URL: https://github.com/nodejs/node/pull/14607 Fixes: https://github.com/nodejs/node/issues/14586 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* lib,test: use regular expression literalsRich Trott2017-05-051-4/+2
| | | | | | | | | | | | | | Replace RegExp constructors with regular expression literals where possible. PR-URL: https://github.com/nodejs/node/pull/12807 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
* test: add more WHATWG URL origin testsBrian White2017-03-091-0/+16
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/11691 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* url: implement URL.prototype.toJSONMichaël Zasso2017-02-161-1/+1
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/11236 Ref: https://github.com/whatwg/url/pull/229 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
* test, url: synchronize WPT url testsJoyee Cheung2017-02-021-1/+1
| | | | | | | | | | | | | | | | * attributon of WPT in url-setter-tests * add WPT test utilities * synchronize WPT URLSearchParams tests * synchronize WPT url tests * split whatwg-url-inspect test * port historical url tests from WPT * protocol setter and special URLs Refs: https://github.com/w3c/web-platform-tests/pull/4413 Refs: https://github.com/whatwg/url/issues/104 PR-URL: https://github.com/nodejs/node/pull/11079 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
* url: define @@toStringTag as a data propertyTimothy Gu2017-01-281-2/+2
| | | | | | | | | | | | | | | | | Even though this is not fully Web IDL spec-compliant, it is arguably the best we can do. Following the spec would mean non-trivial performance deterioration (10% when parsing a medium-length URL), while the current getter behavior is not adopted by any implementer, and it causes some spec ambiguity when the getter is called with !(this instanceof URL). This commit adopts Chrome's behavior, and is consistent with ECMAScript-defined classes while providing reasonable behaviors for corner cases as well. Until the Web IDL spec is changed one way or another, this is the way to go. PR-URL: https://github.com/nodejs/node/pull/10906 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* url: allow use of URL with http.request and https.requestJames M Snell2017-01-091-0/+17
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/10638 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Michal Zasso <targos@protonmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* benchmark,lib,test: adjust for lintingRich Trott2017-01-061-3/+3
| | | | | | | | | Formatting changes for upcoming linter update. PR-URL: https://github.com/nodejs/node/pull/10561 Reviewed-By: Teddy Katz <teddy.katz@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
* url: make WHATWG URL properties spec compliantJoyee Cheung2016-12-291-0/+127
* Set exposed attributes of the interface enumerable and configurable, as required by the spec. See: https://heycam.github.io/webidl/#es-attributes * Make sure `URL#searchParams` returns `[[SameObject]]` * Add the missing `URL#href` setter * Reorder the properties to match https://url.spec.whatwg.org/#api * Add tests for the ECMAScript property attributes PR-URL: https://github.com/nodejs/node/pull/10408 Fixes: https://github.com/nodejs/node/issues/10376 Reviewed-By: James M Snell <jasnell@gmail.com>