blob: eca7a4906400fe697cd42d76d6f8904707430525 [file] [log] [blame]
<!DOCTYPE html>
<title>Canvas test: 2d.imageData.object.properties</title>
<meta name="author" content="Philip Taylor">
<script src="../common/canvas-tests.js"></script>
<link rel="stylesheet" href="../common/canvas-tests.css">
<body class="show_output">
<h1><a href="index.2d.html">2d</a>.<a href="index.2d.imageData.html">imageData</a>.<a href="index.2d.imageData.object.html">object</a>.properties</h1>
<p class="desc">ImageData objects have the right properties</p>
<div class="refs">Spec references:
<ul>
<li><a href="../annotated-spec/canvas.html#testrefs.2d.imageData.type">2d.imageData.type</a>
</ul>
</div>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {
var imgdata = ctx.getImageData(0, 0, 10, 10);
_assertEqual(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
_assertEqual(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
_assertEqual(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
});
</script>