<html>
<head>
<style>
#example {
  width: 100%;
  height: 100%;
}
</style>
<script src="../../../resources/js-test.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()">
    <canvas id="example"></canvas>
</body>
</html>

