blob: fd609487d2978275d45aab4cd09bdbbe9501a17c [file] [log] [blame]
<!DOCTYPE HTML>
<script src="../../../../../resources/testharness.js"></script>
<script src="../../../../../resources/testharnessreport.js"></script>
<script>
test(function() {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d',
{})
var dataLinearRGB = new Float32Array(4);
var imageData = ctx.createImageData(dataLinearRGB, 1, 1,
{});
ctx.putImageData(imageData, 5, 5);
var data = ctx.getImageData(5,5,1,1).dataUnion;
}, "Putting a float-32 ImageData with no color settings on a context 2D should not crash.");
test(function() {
var canvas = document.createElement('canvas');
var ctx = canvas.getContext('2d',
{})
var dataLinearRGB = new Uint16Array(4);
var imageData = ctx.createImageData(dataLinearRGB, 1, 1,
{});
ctx.putImageData(imageData, 5, 5);
var data = ctx.getImageData(5,5,1,1).dataUnion;
}, "Putting a uint-16 ImageData with no color settings on a context 2D should not crash.");
</script>