-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WHATWG URL origin cleanup + tests #11691
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleanup LTGM, the additional tests seem to be duplicates
|
||
// Test special origins | ||
[ | ||
{ expected: 'https://whatwg.org', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most tests here are already in url-tests.js
, therefore tested by test-whatwg-url-origin
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically the file:
origin test is not covered by the WPT tests, which would have uncovered the 'bug.' I just added other origin tests for completeness.
'file' should have been 'file:' but since the WHATWG URL spec suggests using an opaque origin (which is what was already being used for file URLs), we'll just keep using that, making this merely a cleanup. PR-URL: nodejs#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>
PR-URL: nodejs#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>
7a0dd17
to
e4fbd8e
Compare
'file' should have been 'file:' but since the WHATWG URL spec suggests using an opaque origin (which is what was already being used for file URLs), we'll just keep using that, making this merely a cleanup. PR-URL: nodejs#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>
PR-URL: nodejs#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>
Notable changes: * module: The [module loading global fallback] (https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [nodejs#9283](nodejs#9283) * net: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [nodejs#11762](nodejs#11762) * url: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [nodejs#11691](nodejs#11691) PR-URL: nodejs#11831
Notable changes: * module: The [module loading global fallback] (https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [nodejs#9283](nodejs#9283) * net: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [nodejs#11762](nodejs#11762) * url: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [nodejs#11691](nodejs#11691) PR-URL: nodejs#11831
Notable changes: * module: The [module loading global fallback] (https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [#9283](nodejs/node#9283) * net: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [#11762](nodejs/node#11762) * url: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [#11691](nodejs/node#11691) PR-URL: nodejs/node#11831 Signed-off-by: Ilkka Myller <ilkka.myller@nodefield.com>
'file' should have been 'file:' but since the WHATWG URL spec suggests using an opaque origin (which is what was already being used for file URLs), we'll just keep using that, making this merely a cleanup. PR-URL: nodejs#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>
PR-URL: nodejs#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>
Notable changes: * module: The [module loading global fallback] (https://nodejs.org/dist/latest-v6.x/docs/api/modules.html#modules_loading_from_the_global_folders) to the Node executable's directory now works correctly on Windows. (Richard Lau) [nodejs#9283](nodejs#9283) * net: `Socket.prototype.connect` now once again functions without a callback. (Juwan Yoo) [nodejs#11762](nodejs#11762) * url: `URL.prototype.origin` now properly specified an opaque return of `'null'` for `file://` URLs. (Brian White) [nodejs#11691](nodejs#11691) PR-URL: nodejs#11831
'file'
should have been'file:'
but since the WHATWG URL spec suggests using an opaque origin (which is what was already being used for file URLs), we'll just keep using that, making this merely a cleanup.Additionally, some more origin tests are added.
CI: https://ci.nodejs.org/job/node-test-pull-request/6708/
/cc @nodejs/url
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)