Skip to content

Commit

Permalink
add test for invalid ancillary after IDAT
Browse files Browse the repository at this point in the history
  • Loading branch information
svgeesus committed Mar 9, 2024
1 parent b1a2508 commit 04486cf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions png/errors/unknown-ancillary-error-recovery-2-ref.html
@@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>PNG Third Edition: Decoder error recovery, invalid ancillary</title>
<link rel="author" title="Chris Lilley" href="mailto:chris@w3.org">
<style>
.test {
width: 32px;
height: 32px;
background-color: green;
}
</style>
<body>
<p>Test passes if you see a rainbow square, and not a red one.</p>
<div class="test"><img src="support/no-invalid-chunks.png" alt=""></div>
</body>
</html>
21 changes: 21 additions & 0 deletions png/errors/unknown-ancillary-error-recovery-2.html
@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>PNG Third Edition: Decoder error recovery, invalid ancillary after IDAT</title>
<link rel="author" title="Chris Lilley" href="mailto:chris@w3.org">
<link rel="help" href="https://www.w3.org/TR/png-3/#13Decoders.Errors">
<link rel="help" href="https://github.com/w3c/PNG-spec/issues/320">
<link rel="match" href="unknown-ancillary-error-recovery-2-ref.html">
<meta name="assert" content="Encountering an unknown ancillary chunk is never an error. The chunk can simply be ignored.">
<style>
.test {
width: 32px;
height: 32px;
background-color: red;
}
</style>
<body>
<p>Test passes if you see a rainbow square, and not a red one.</p>
<div class="test"><img src="support/invalid-unknown-ancillary-after-IDAT.png" alt=""></div>
</body>
</html>

0 comments on commit 04486cf

Please sign in to comment.