blob: 174c9d02156dc0ffc044fbb38666891630835e30 [file] [edit]
<!DOCTYPE html>
<html>
<head>
<style>
canvas {
width: 100px;
height: 100px;
background: red;
}
</style>
<script>
if (window.testRunner)
testRunner.waitUntilDone();
onload = async () => {
await new Promise(resolve => requestAnimationFrame(resolve));
await new Promise(resolve => requestAnimationFrame(resolve));
let canvas = document.getElementById('canvas');
let gl = canvas.getContext('webgl');
gl.clearColor(0, 0.5, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body>
<p>You should see a green box.</p>
<canvas id="canvas"></canvas>
</body>
</html>