OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE> |
| 2 <canvas id="canvas2D" width="50" height="50" background-color="red"></canvas> |
| 3 <script> |
| 4 if (window.testRunner) { |
| 5 testRunner.dumpAsTextWithPixelResults(); |
| 6 } |
| 7 |
| 8 // Currently, we push a Green color frame from OffscreenCanvas; so we test |
| 9 // whether the associated canvas has green pixel. In the future, when we |
| 10 // change solidColorFrame to textureFrame, the expected png needs to changed too
. |
| 11 var canvas2D = document.getElementById("canvas2D"); |
| 12 var offscreenCanvas = canvas2D.transferControlToOffscreen(); |
| 13 var offscreen2d = offscreenCanvas.getContext("2d"); |
| 14 offscreen2d.commit(); |
| 15 </script> |
OLD | NEW |