Skip to content

Commit

Permalink
Add two cases to preload SRI
Browse files Browse the repository at this point in the history
  • Loading branch information
noamr committed Mar 23, 2022
1 parent f987e74 commit e570c2b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions preload/subresource-integrity.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,28 @@
{integrity: "sha256-deaddeadbeefYHFvsYdWumweeFAw0hJDTFt9seErghA="}
)

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

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

} // if.

} // for-of.
Expand Down

0 comments on commit e570c2b

Please sign in to comment.