mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-07-17 02:29:06 +00:00
31 lines
1.2 KiB
HTML
31 lines
1.2 KiB
HTML
<!DOCTYPE html>
|
|
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
|
<title>Canvas test: 2d.imageData.put.wrongtype</title>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/common/canvas-tests.js"></script>
|
|
<link rel="stylesheet" href="/common/canvas-tests.css">
|
|
<body class="show_output">
|
|
|
|
<h1>2d.imageData.put.wrongtype</h1>
|
|
<p class="desc">putImageData() does not accept non-ImageData objects</p>
|
|
|
|
|
|
<p class="output">Actual output:</p>
|
|
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
|
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
|
|
<ul id="d"></ul>
|
|
<script>
|
|
var t = async_test("putImageData() does not accept non-ImageData objects");
|
|
_addTest(function(canvas, ctx) {
|
|
|
|
var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
|
|
assert_throws(new TypeError(), function() { ctx.putImageData(imgdata, 0, 0); });
|
|
assert_throws(new TypeError(), function() { ctx.putImageData("cheese", 0, 0); });
|
|
assert_throws(new TypeError(), function() { ctx.putImageData(42, 0, 0); });
|
|
|
|
|
|
});
|
|
</script>
|
|
|