Skip to content
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

Add JSON modules tests for charset, integrity, and MIME type parameters #28606

Merged
merged 1 commit into from Apr 22, 2021

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Apr 20, 2021

Add JSON modules tests for the following:

  • The <script> element's integrity attribute is respected.
  • JSON modules are always decoded as UTF-8 regardless of Content-Type
    or the document's encoding. The existing coverage we had on this in
    utf8.tenative.html was renamed to charset.html, refactored, and
    expanded.
  • Adding parameters to the MIME type doesn't prevent it from being
    evaluated as a JSON MIME type.

Note, some of the existing MIME type tests for /+json still fail
because it seems the spec issue on these at
whatwg/mimesniff#112 hasn't been fully
resolved. I'll follow up with that separately.

Bug: 1132413
Change-Id: I682de01bbb14b53214fcc16f427a4875f8cfed7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2841103
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#875274}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

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

The review process for this patch is being conducted in the Chromium project.

Add JSON modules tests for the following:
- The <script> element's integrity attribute is respected.
- JSON modules are always decoded as UTF-8 regardless of Content-Type
  or the document's encoding.  The existing coverage we had on this in
  utf8.tenative.html was renamed to charset.html, refactored, and
  expanded.
- Adding parameters to the MIME type doesn't prevent it from being
  evaluated as a JSON MIME type.

Note, some of the existing MIME type tests for */*+json still fail
because it seems the spec issue on these at
whatwg/mimesniff#112 hasn't been fully
resolved. I'll follow up with that separately.

Bug: 1132413
Change-Id: I682de01bbb14b53214fcc16f427a4875f8cfed7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2841103
Reviewed-by: Domenic Denicola <domenic@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#875274}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants