summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2018-11-13 15:31:44 -0800
committerRich Trott <rtrott@gmail.com>2018-12-01 08:53:05 -0800
commit639f6411a76d010b1807fd1b6e78b8ba894a281e (patch)
treeeb7b1ad48f9a0be403da992ee5eec6b3dde67686 /test
parente1438025edaf18d490548ba0f75f7ba702493c22 (diff)
downloadandroid-node-v8-639f6411a76d010b1807fd1b6e78b8ba894a281e.tar.gz
android-node-v8-639f6411a76d010b1807fd1b6e78b8ba894a281e.tar.bz2
android-node-v8-639f6411a76d010b1807fd1b6e78b8ba894a281e.zip
src: set HAS_USERNAME/PASSWORD more strictly
Fixes: https://github.com/nodejs/node/issues/24211 PR-URL: https://github.com/nodejs/node/pull/24495 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-whatwg-url-custom-deepequal.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/parallel/test-whatwg-url-custom-deepequal.js b/test/parallel/test-whatwg-url-custom-deepequal.js
new file mode 100644
index 0000000000..9150b1561b
--- /dev/null
+++ b/test/parallel/test-whatwg-url-custom-deepequal.js
@@ -0,0 +1,18 @@
+'use strict';
+// This tests that the internal flags in URL objects are consistent, as manifest
+// through assert libraries.
+// See https://github.com/nodejs/node/issues/24211
+
+// Tests below are not from WPT.
+
+require('../common');
+const assert = require('assert');
+
+assert.deepStrictEqual(
+ new URL('./foo', 'https://example.com/'),
+ new URL('https://example.com/foo')
+);
+assert.deepStrictEqual(
+ new URL('./foo', 'https://user:pass@example.com/'),
+ new URL('https://user:pass@example.com/foo')
+);