1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/canvas/test/webgl-conformance/extra/offscreen-issue.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 +<meta charset="utf-8"> 1.8 +<script type="text/javascript"> 1.9 + 1.10 +window.onload = function() { 1.11 + setup("1"); 1.12 + setup("2"); 1.13 +} 1.14 + 1.15 +function setup(id) { 1.16 + var c = document.getElementById(id); 1.17 + var names = ["webgl", "experimental-webgl"]; 1.18 + for (var i = 0; i < names.length; ++i) { 1.19 + gl = canvas.getContext(names[i]); 1.20 + if (gl) { 1.21 + break; 1.22 + } 1.23 + } 1.24 + gl.clearColor(1,0,0,1); 1.25 + gl.clear(gl.COLOR_BUFFER_BIT); 1.26 + setTimeout(function() { 1.27 + gl.enable(gl.SCISSOR_TEST); 1.28 + gl.scissor(0,0,50,50); 1.29 + gl.clearColor(0,1,0,1); 1.30 + gl.clear(gl.COLOR_BUFFER_BIT); 1.31 + }, 500); 1.32 +} 1.33 +</script> 1.34 +</head> 1.35 +<body> 1.36 +<canvas id="1"></canvas> 1.37 +<div style="height:4000px;">content that is tall like several articles</div> 1.38 +<canvas id="2"></canvas> 1.39 +</body> 1.40 +</html> 1.41 +