blob: 42a6fdb8a4a0a239fc9f0916f995ad636ab22a42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<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()">
<!-- 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>
</body>
</html>
|