Skip to content

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Feb 11, 2022

Spec change: whatwg/fetch#1392

@mnot mnot removed their request for review February 17, 2022 22:14
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look great.

(Optional nit: for INIT_TESTS it might be clearer if you prefix the expectation variables in the for loop with "expected", e.g., "expectedStatus".)

Copy link
Contributor

@ricea ricea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be a test for a circular structure like

let a = {};
a.a = a;

@lucacasonato
Copy link
Member Author

@ricea Added.

@lucacasonato
Copy link
Member Author

I'd like to land these tests so I can ship this feature in Deno in our canary branch. Any objections? Should I mark them "tenative" until the spec PR lands?

@ricea
Copy link
Contributor

ricea commented May 12, 2022

Yes, fine to land as "tentative" if you're willing to rename them later.

@lucacasonato lucacasonato force-pushed the response_json_static_method branch from 33c3c7f to 1a8281d Compare May 13, 2022 10:59
@annevk annevk merged commit 27e770b into web-platform-tests:master May 18, 2022
annevk pushed a commit to whatwg/fetch that referenced this pull request May 18, 2022
A method that can be used to create well-formed JSON responses with very little effort.

The JSON response is not pretty printed.

Tests: web-platform-tests/wpt#32825.

Closes #1389.
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 30, 2022
This commit adds support for the `Response.json` static method as
specified in whatwg/fetch#1392.

All WPTs from web-platform-tests/wpt#32825 pass.

Bug: 1305358
Change-Id: Iaafdd514ed12644b6433c02e7d076ce43f51b9ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3639064
Reviewed-by: Yutaka Hirano <[email protected]>
Reviewed-by: Adam Rice <[email protected]>
Commit-Queue: Yutaka Hirano <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1019479}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants