Skip to content

Commit

Permalink
[WPT] Do not allow hash method mismatch in consuming preloads
Browse files Browse the repository at this point in the history
Bug: whatwg/html#7973
Change-Id: I1bbe327080a83bcd74f46f64668cf73490ef6d7c
  • Loading branch information
hiroshige-g authored and chromium-wpt-export-bot committed Jun 6, 2022
1 parent b8ebea7 commit bb686db
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions preload/subresource-integrity.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,18 +331,28 @@
{integrity: sha256}
)

// This is an acceptable failure
SRIPreloadTest(
true,
true,
`[Tentative] Same-origin ${destination} with matching digest does not reuse preload with matching but stronger digest.`,
`Same-origin ${destination} with matching digest does not reuse preload with matching but stronger digest.`,
2,
destination,
same_origin_prefix + destination + ext + `?${token()}`,
{integrity: sha384},
{integrity: sha256},
)

SRIPreloadTest(
true,
false,
`Same-origin ${destination} with wrong digest does not reuse preload with correct and stronger digest.`,
2,
destination,
same_origin_prefix + destination + ext + `?${token()}`,
{integrity: sha384},
{integrity: "sha256-deadbeefQ15RYHFvsYdWumweeFAw0hJDTFt9seErghA="}
)

SRIPreloadTest(
true,
true,
Expand Down

0 comments on commit bb686db

Please sign in to comment.