Skip to content

test(html): render an image, and one of them in the dark - #701

Merged
andiwand merged 1 commit into
mainfrom
test/image-view-output
Aug 18, 2026
Merged

test(html): render an image, and one of them in the dark#701
andiwand merged 1 commit into
mainfrom
test/image-view-output

Conversation

@andiwand

Copy link
Copy Markdown
Member

🤖 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 had
no reference output at all. The corpus-driven capability checks in odr_test
skipped every image type for want of a file too, which is what
FileTypeCapabilities::color_scheme for 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:

file format source
png/tango-example-icons.png png, with transparency Tango-example icons.png, public domain
bmp/tango-example-icons.bmp bmp the png above, converted with sips — Commons hosts no bmp
jpg/fantastic-landscape.jpg jpeg Fantastic Landscape MET DT4562.jpg, CC0
gif/knights-tour.gif gif, animated Knight's tour anim 2.gif, CC0
webp/lorine-niedecker.webp webp Lorine Niedecker reading by river.webp, public domain
svg/rotating-snakes.svg svg, no xml declaration Rotating snakes illusion.svg, public domain
svg/civitas-schinesghe-emblem.svg svg, declaration + doctype Emblem of Civitas Schinesghe.svg, CC0

The two svg cover the two ways one arrives: a bare <svg> root, which only a
parse 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 dark variant. The image
view'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 synthetic
signatures 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) — a
reference render of those would pin a broken-image box.

Pins advanced: OpenDocument.test and
OpenDocument.test.output.

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
@andiwand
andiwand merged commit 4b1c379 into main Aug 18, 2026
36 checks passed
@andiwand
andiwand deleted the test/image-view-output branch August 18, 2026 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant