4 https://bugzilla.mozilla.org/show_bug.cgi?id=1716622
8 <title>Test for large ImageData
</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1716622">Mozilla Bug
1716622</a>
15 <div id=
"content" style=
"display: none">
20 <canvas id=
"canvas" width=
"800" height=
"800"></canvas>
21 <script type=
"application/javascript">
22 SimpleTest.waitForExplicitFinish();
25 var ctx = document.getElementById(
"canvas").getContext(
"2d");
29 ctx.createImageData(
23175,
23175);
33 ok(ex.toString().includes(
"Invalid width or height"),
34 "Expected createImageData exception");
38 ctx.createImageData(
33000,
33000);
42 ok(ex.toString().includes(
"Invalid width or height"),
43 "Expected createImageData exception");
47 ctx.getImageData(
0,
0,
23175,
23175);
51 ok(ex.toString().includes(
"negative or greater than the allowed amount"),
52 "Expected getImageData exception");
56 new ImageData(
23175,
23175);
60 ok(ex.toString().includes(
"negative or greater than the allowed amount"),
61 "Expected ImageData constructor exception");