| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <!-- DO NOT EDIT! This test has been generated by tools/gentest.py. --> | |
| 3 <title>OffscreenCanvas test: 2d.imageData.create2.round</title> | |
| 4 <script src="/resources/testharness.js"></script> | |
| 5 <script src="/resources/testharnessreport.js"></script> | |
| 6 <script src="/common/canvas-tests.js"></script> | |
| 7 | |
| 8 <h1>2d.imageData.create2.round</h1> | |
| 9 <p class="desc">createImageData(w, h) is rounded the same as getImageData(0, 0,
w, h)</p> | |
| 10 | |
| 11 | |
| 12 <script> | |
| 13 var t = async_test("createImageData(w, h) is rounded the same as getImageData(0,
0, w, h)"); | |
| 14 t.step(function() { | |
| 15 | |
| 16 var offscreenCanvas = new OffscreenCanvas(100, 50); | |
| 17 var ctx = offscreenCanvas.getContext('2d'); | |
| 18 | |
| 19 var imgdata1 = ctx.createImageData(10.01, 10.99); | |
| 20 var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99); | |
| 21 _assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width"); | |
| 22 _assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.heigh
t"); | |
| 23 | |
| 24 t.done(); | |
| 25 | |
| 26 }); | |
| 27 </script> | |
| OLD | NEW |