1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/bugs/632781-normalsize.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,26 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <body> 1.7 + <!-- 1.8 + This test makes sure that scrolling a normal sized canvas would correctly 1.9 + scroll its contents. Normal sized canvases are accelerated, so this test 1.10 + makes sure that the accelerated code path for this operaton works correctly. 1.11 + 1.12 + The padding in this test is added mostly to make sure that scrollLeft/Top 1.13 + correctly skip the padding. 1.14 + --> 1.15 + <div id="container" style="width: 100px; height: 100px; padding: 10px; overflow: hidden"> 1.16 + <canvas width="300" height="300" id="c"></canvas> 1.17 + </div> 1.18 + <script> 1.19 + var ctx = document.getElementById("c").getContext("2d"); 1.20 + ctx.fillStyle = "red"; 1.21 + ctx.fillRect(0, 0, 300, 100); 1.22 + ctx.fillStyle = "green"; 1.23 + ctx.fillRect(0, 100, 300, 200); 1.24 + var container = document.getElementById("container"); 1.25 + container.scrollLeft = 10; 1.26 + container.scrollTop = 110; 1.27 + </script> 1.28 + </body> 1.29 +</html>