blob: 9b3042944fd0183795fd41919cff393a6c606822 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<script>
description("This test checks behavior of drawImage on a canvas that failed to allocate its backing store. This test passes by not crashing.");
var canvas1 = document.createElement("canvas");
var ctx1 = canvas1.getContext('2d');
var canvas2 = document.createElement("canvas");
// Terapixel canvas should fail to allocate
canvas2.width = 1000000;
canvas2.height = 1000000;
var ctx2 = canvas2.getContext('2d');
ctx2.drawImage(canvas1, 0, 0);
</script>
</body>
</html>