Skip to content

Commit

Permalink
Add test for stronger/weaker digest
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Mar 23, 2022
1 parent e570c2b commit bdae220
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion preload/subresource-integrity.html
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,25 @@
SRIPreloadTest(
true,
true,
`Same-origin ${destination} with matching digest does not reuse preload with matching but different digest.`,
`Same-origin ${destination} with matching digest does not reuse preload with matching but weaker digest.`,
2,
destination,
same_origin_prefix + destination + ext + `?${token()}`,
{integrity: sha384},
{integrity: sha256},
)

SRIPreloadTest(
true,
true,
`Same-origin ${destination} with matching digest does not reuse preload with matching but stronger digest.`,
2,
destination,
same_origin_prefix + destination + ext + `?${token()}`,
{integrity: sha256},
{integrity: sha384},
)

} // if.

} // for-of.
Expand Down

0 comments on commit bdae220

Please sign in to comment.