| <html> |
| <head> |
| <style> |
| #example { |
| width: 100%; |
| height: 100%; |
| } |
| </style> |
| <script src="../../js/resources/js-test-pre.js"></script> |
| <script src="resources/webgl-test-utils.js"> </script> |
| <script> |
| description('Tests that canvas does not crash on resize.'); |
| |
| <!-- The following used to cause a crash in Efl and Qt port --> |
| function start() |
| { |
| var canvas = document.getElementById('example'); |
| var gl = WebGLTestUtils.create3DContext(canvas); |
| |
| // Change the size of the canvas's backing store to match the size it is displayed. |
| canvas.width = canvas.clientWidth; |
| canvas.height = canvas.clientHeight; |
| } |
| |
| testPassed("Canvas did not crash on resize."); |
| </script> |
| </head> |
| |
| <body onload="start()"> |
| <!-- Enable WebGL in the testing framework (without this we will fail to |
| create a GL context) --> |
| |
| <script> |
| if (window.testRunner) { |
| testRunner.overridePreference("WebKitWebGLEnabled", "1"); |
| } |
| </script> |
| |
| <canvas id="example"></canvas> |
| <script src="../../js/resources/js-test-post.js"></script> |
| </body> |
| </html> |
| |