diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html')
-rw-r--r-- | testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html new file mode 100644 index 0000000000..e93c17c8e8 --- /dev/null +++ b/testing/web-platform/tests/html/canvas/element/manual/imagebitmap/imageBitmap-from-imageData-no-image-rotation.html @@ -0,0 +1,26 @@ +<html> + <link rel="match" href="imageBitmap-from-imageData-no-image-rotation-expected.html" /> + <style type="text/css"> + canvas { + image-orientation: none; + } + </style> +<body> + <canvas id="myCanvas" width="400" height="400"></canvas> +</body>> +<script> +var canvas = document.getElementById('myCanvas'); +ctx = canvas.getContext('2d'); +image = document.createElement("img"); +image.src = "../../../resources/black_white.png" +image.onload = function() { + Promise.all([ + // The image should be flipped and ignoring "image-orientation" setting + // in css style. + createImageBitmap(image, { imageOrientation: 'flipY' }), + ]).then(function(sprites) { + // Draw image onto the canvas + ctx.drawImage(sprites[0], 0, 0); +}); +} +</script>
\ No newline at end of file |