1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mobile/android/base/tests/robocop_boxes.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,42 @@ 1.4 +<!-- 1.5 +DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! 1.6 + 1.7 +This file is specifically designed to create a page larger than 1.8 +any screen fennec could run on (to allow panning in both axes). 1.9 +It is filled with 100x100 pixel boxes that are of unique colour, 1.10 +so that we can identify exactly what part of the page we are 1.11 +rendering at any given time. The colours are specifically chosen 1.12 +so that adjacent boxes have a fairly large variation in colour, 1.13 +and so that errors due to 565/888 conversion are minimised. This 1.14 +is done by dropping the bottom few bits on each color channel, 1.15 +so that conversion from 888->565 is pretty much lossless, and any 1.16 +variation only comes in from however the drivers do 565->888. 1.17 + 1.18 +A lot of the tests depend on this behaviour, so ensure that all 1.19 +the tests pass (on a variety of screen sizes) when making any 1.20 +changes to this file. 1.21 + --> 1.22 +<html style="margin: 0; padding: 0"> 1.23 +<head> 1.24 + <title>Browser Box test</title> 1.25 + <meta name="viewport" content="initial-scale=1.0"/> 1.26 + <meta charset="utf-8"> 1.27 +</head> 1.28 +<body style="margin: 0; padding: 0"> 1.29 +<script type="text/javascript"> 1.30 +for (var y = 0; y < 2000; y += 100) { 1.31 + document.write("<div style='width: 2000px; height: 100px; margin: 0; padding: 0; border: none'>\n"); 1.32 + for (var x = 0; x < 2000; x += 100) { 1.33 + var r = (Math.floor(x / 3) % 256); 1.34 + r = r & 0xF8; 1.35 + var g = (x + y) % 256; 1.36 + g = g & 0xFC; 1.37 + var b = (Math.floor(y / 3) % 256); 1.38 + b = b & 0xF8; 1.39 + document.write("<div style='float: left; width: 100px; height: 100px; margin: 0; padding: 0; border: none; background-color: rgb(" + r + "," + g + "," + b + ")'> </div>\n"); 1.40 + } 1.41 + document.write("</div>\n"); 1.42 +} 1.43 +</script> 1.44 +</body> 1.45 +</html>