mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-22 16:09:23 +00:00
Some checks are pending
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
With the newly supported fuzzy matching in our test-web runner, we can now define the expected maximum color channel and pixel count errors per failing test and set a baseline they should not exceed. The figures I added to these tests all come from my macOS M4 machine. Most discrepancies seem to come from color calculations being slightly off.
42 lines
1.1 KiB
HTML
42 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<link rel="match" href="../expected/canvas-path-rect-ref.html" />
|
|
<meta name="fuzzy" content="maxDifference=0-1;totalPixels=0-148">
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
}
|
|
body {
|
|
background-color: white;
|
|
}
|
|
</style>
|
|
<canvas width=500 height=500></canvas>
|
|
<script>
|
|
function drawRect() {
|
|
var canvas = document.querySelector("canvas");
|
|
var ctx = canvas.getContext("2d");
|
|
ctx.fillStyle = 'black';
|
|
ctx.fillRect(0, 0, 500, 500);
|
|
|
|
ctx.fillStyle = 'red';
|
|
ctx.beginPath();
|
|
ctx.rect(10, 20, 150, 100);
|
|
ctx.fill();
|
|
|
|
ctx.fillStyle = 'yellow';
|
|
ctx.beginPath();
|
|
ctx.roundRect(50, 310, 100, 100, 25);
|
|
ctx.fill('evenodd');
|
|
|
|
ctx.fillStyle = 'green';
|
|
ctx.beginPath();
|
|
ctx.rect(200, 210, 100, 100);
|
|
ctx.fill('evenodd');
|
|
|
|
ctx.rotate(0.2);
|
|
ctx.fillStyle = 'orange';
|
|
ctx.beginPath();
|
|
ctx.roundRect(325, 300, 100, 100, [ { x: 5, y: 20 }, 10, { x: 15, y: 30 }, 20 ]);
|
|
ctx.fill('evenodd');
|
|
}
|
|
drawRect();
|
|
</script>
|