| Index: third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-no-alpha.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-no-alpha.html b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-no-alpha.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8347ec6f0c1d316d2a155e9c59677e92e86502cd
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/canvas/imagebitmap/transferImageBitmap-no-alpha.html
|
| @@ -0,0 +1,22 @@
|
| +<!DOCTYPE html>
|
| +<canvas id = 'dstCanvas' width='100' height='100' style='background-color:red;'></canvas>
|
| +<script>
|
| +if (window.testRunner) {
|
| + testRunner.waitUntilDone();
|
| +}
|
| +var srcCanvas = document.createElement('canvas');
|
| +srcCanvas.width = srcCanvas.height = 100;
|
| +var ctx = srcCanvas.getContext('2d');
|
| +ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
|
| +ctx.fillRect(0, 0, 100, 100);
|
| +createImageBitmap(srcCanvas).then(consumeImageBitmap)
|
| +
|
| +function consumeImageBitmap(image) {
|
| + var dstCanvas = document.getElementById('dstCanvas');
|
| + var dstCtx = dstCanvas.getContext('imagebitmap', { alpha: false });
|
| + dstCtx.transferImageBitmap(image);
|
| + if (window.testRunner) {
|
| + testRunner.notifyDone();
|
| + }
|
| +}
|
| +</script>
|
|
|