test(html): render an image, and one of them in the dark - #701
Merged
Conversation
No test file was an image, so the image view — the page every png, jpg, gif, bmp, webp and svg is rendered into — had no reference output at all, and the corpus-driven capability checks skipped every image type for want of a file. The public test data gains one file per format a browser paints from a data url, all public domain or CC0 from Wikimedia Commons. The png is rendered a second time in the `dark` variant: its transparency is what shows that the image view's color scheme is the ground behind the picture and nothing else. `magic` gains the same files as real input. Its image coverage was synthetic signatures only, which cannot show that a jpeg names itself by whichever application marker its encoder wrote, or that an svg is named by parsing it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01992btoumrdW4qpNeiD5bCg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Every png, jpg, gif, bmp, webp and svg goes out through one page — the image
view,
html/image_file.cpp— and no test file was an image, so that page hadno reference output at all. The corpus-driven capability checks in
odr_testskipped every image type for want of a file too, which is what
FileTypeCapabilities::color_schemefor those types was resting on.Test data. The public test data gains one file per format a browser paints
from a data url, each public domain or CC0 from Wikimedia Commons and recorded
with its file page in
index.csv:png/tango-example-icons.pngbmp/tango-example-icons.bmpsips— Commons hosts no bmpjpg/fantastic-landscape.jpggif/knights-tour.gifwebp/lorine-niedecker.webpsvg/rotating-snakes.svgsvg/civitas-schinesghe-emblem.svgThe two svg cover the two ways one arrives: a bare
<svg>root, which only aparse can name, and an Illustrator export whose doctype names an external dtd
that must not be fetched.
Dark. The png is rendered a second time in the
darkvariant. The imageview's color scheme is the ground behind the picture and nothing else, so the
file that shows it is the one with transparency — hence the png rather than the
photograph.
magic. The same files as real input. Its image coverage was syntheticsignatures only, which cannot show that a jpeg names itself by whichever
application marker its encoder happened to write, or that an svg is named by
parsing rather than by its head.
Audio and video stay uncovered on purpose. So do the image types no browser
paints (
tiff,heic,avif,jp2,jxl,psd,wmf,emf) — areference render of those would pin a broken-image box.
Pins advanced: OpenDocument.test and
OpenDocument.test.output.