mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-11-09 09:41:02 +00:00
21 lines
600 B
HTML
21 lines
600 B
HTML
<!DOCTYPE html>
|
|
<script src="../include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let area = document.createElement("canvas");
|
|
let areaCtx = area.getContext("2d");
|
|
|
|
area.width = 1;
|
|
area.height = 1;
|
|
|
|
areaCtx.fillStyle = "#ff8040";
|
|
areaCtx.fillRect(0, 0, 1, 1);
|
|
|
|
let imageData = areaCtx.getImageData(0, 0, area.width, area.height);
|
|
|
|
if (imageData.data[0] == 0xff && imageData.data[1] == 0x80 && imageData.data[2] == 0x40 && imageData.data[3] == 0xff)
|
|
println("PASS");
|
|
else
|
|
println("FAIL");
|
|
});
|
|
</script>
|