mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
Tests: Add screenshot test for Canvas2D fillstyle opacity
This commit is contained in:
parent
26970201bd
commit
b909e3d587
Notes:
github-actions[bot]
2024-12-19 12:32:10 +00:00
Author: https://github.com/ananas-dev Commit: https://github.com/LadybirdBrowser/ladybird/commit/b909e3d5875 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2974 Reviewed-by: https://github.com/kalenikaliaksandr ✅
3 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<img src="../images/canvas-fillstyle-opacity.png">
|
BIN
Tests/LibWeb/Screenshot/images/canvas-fillstyle-opacity.png
Normal file
BIN
Tests/LibWeb/Screenshot/images/canvas-fillstyle-opacity.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
19
Tests/LibWeb/Screenshot/input/canvas-fillstyle-opacity.html
Normal file
19
Tests/LibWeb/Screenshot/input/canvas-fillstyle-opacity.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<link rel="match" href="../expected/canvas-fillstyle-opacity-ref.html" />
|
||||
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
body {
|
||||
background-color: white;
|
||||
}
|
||||
</style>
|
||||
|
||||
<canvas id="myCanvas" width="200" height="200"></canvas>
|
||||
|
||||
<script>
|
||||
const canvas = document.getElementById('myCanvas');
|
||||
const ctx = canvas.getContext('2d');
|
||||
ctx.fillStyle = 'rgba(0, 0, 255, 0.5)';
|
||||
ctx.fillRect(50, 50, 100, 100);
|
||||
</script>
|
Loading…
Reference in a new issue