OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <canvas id='c'></canvas> |
| 3 <script> |
| 4 var can = document.getElementById('c'); |
| 5 can.width = can.height = 100; |
| 6 var ctx = can.transferControlToOffscreen().getContext("webgl"); |
| 7 ctx.clearColor(0, 1, 0, 1); |
| 8 ctx.clear(ctx.COLOR_BUFFER_BIT); |
| 9 ctx.commit(); |
| 10 if (window.testRunner) { |
| 11 testRunner.setPrinting(); |
| 12 testRunner.waitUntilDone(); |
| 13 setTimeout(function() { |
| 14 // The setTimeout is a synchronization barrier that guarantees |
| 15 // the commit will be processed by the event loop before the test |
| 16 // is done. |
| 17 testRunner.notifyDone(); |
| 18 }, 0); |
| 19 } |
| 20 </script> |
OLD | NEW |