-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: do not define @@toStringTag with a getter
- Loading branch information
Showing
2 changed files
with
10 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ assert.strictEqual(url.searchParams, oldParams); // [SameObject] | |
// Note: this error message is subject to change in V8 updates | ||
assert.throws(() => url.origin = 'http://foo.bar.com:22', | ||
new RegExp('TypeError: Cannot set property origin of' + | ||
' \\[object Object\\] which has only a getter')); | ||
' \\[object URLPrototype\\] which has only a getter')); | ||
assert.strictEqual(url.origin, 'http://foo.bar.com:21'); | ||
assert.strictEqual(url.toString(), | ||
'http://user:[email protected]:21/aaa/zzz?l=25#test'); | ||
|
@@ -121,7 +121,7 @@ assert.strictEqual(url.hash, '#abcd'); | |
// Note: this error message is subject to change in V8 updates | ||
assert.throws(() => url.searchParams = '?k=88', | ||
new RegExp('TypeError: Cannot set property searchParams of' + | ||
' \\[object Object\\] which has only a getter')); | ||
' \\[object URLPrototype\\] which has only a getter')); | ||
assert.strictEqual(url.searchParams, oldParams); | ||
assert.strictEqual(url.toString(), | ||
'https://user2:[email protected]:23/aaa/bbb?k=99#abcd'); | ||
|