mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
Instead of rendering a reference HTML page that wraps an <img> tag pointing to a PNG, Screenshot tests now load the expected PNG directly from disk and compare it against the rendered screenshot. This eliminates the indirection of loading and rendering a second page just to display a static image. This also means --rebaseline now works for Screenshot tests, generating the expected PNG automatically instead of requiring manual screenshot capture and placement. Changes: - Add TestMode::Screenshot with its own collector and runner - Move PNGs from Screenshot/images/ to Screenshot/expected/ with normalized names matching input filenames - Remove all 92 reference HTML wrapper files and the images/ directory - Remove <link rel="match"> from all 94 Screenshot input HTML files - Update add_libweb_test.py Screenshot boilerplate accordingly - Add Screenshot mode to results viewer image comparison tabs
33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-723">
|
|
<svg height="200" width="350" xmlns="http://www.w3.org/2000/svg">
|
|
<style>
|
|
.text {
|
|
font: italic 40px serif;
|
|
}
|
|
|
|
.thakis {
|
|
font: bold 70px sans-serif;
|
|
}
|
|
|
|
body {
|
|
background-color: white;
|
|
}
|
|
</style>
|
|
<linearGradient id="gradient">
|
|
<stop offset="0%" stop-color="rgba(255, 0, 0, 1)"/>
|
|
<stop offset="10%" stop-color="rgba(255, 154, 0, 1)"/>
|
|
<stop offset="20%" stop-color="rgba(208, 222, 33, 1)"/>
|
|
<stop offset="30%" stop-color="rgba(79, 220, 74, 1)"/>
|
|
<stop offset="40%" stop-color="rgba(63, 218, 216, 1)"/>
|
|
<stop offset="50%" stop-color="rgba(47, 201, 226, 1)"/>
|
|
<stop offset="60%" stop-color="rgba(28, 127, 238, 1)"/>
|
|
<stop offset="70%" stop-color="rgba(95, 21, 242, 1)"/>
|
|
<stop offset="80%" stop-color="rgba(186, 12, 248, 1)"/>
|
|
<stop offset="90%" stop-color="rgba(251, 7, 217, 1)"/>
|
|
<stop offset="100%" stop-color="rgba(255, 0, 0, 1)"/>
|
|
</linearGradient>
|
|
<text x="20" y="105" class="text" transform="rotate(-10 50 100)">There you go :^)</text>
|
|
<text x="90" y="220" class="thakis" fill="url(#gradient)" transform="rotate(-10 50 100) skewY(-10)">thakis</text>
|
|
</svg>
|