blob: 9705e1cc53c855e95e458b6931ed63a4023e9df9 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta name="fuzzy" content="maxDifference=0-33;totalPixels=7800-9500" />
<title>This tests that background image tile's dimension is computed correctly for the contain case.</title>
<style>
div {
background:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAQACAIAAAAP+8yGAAACoklEQVR4Xu3dwQ0CMQxEUTtKvbRCC3RqjtwR3g3WSwP/MDOObaIlH89XdJ4VzQcAACBiZzcgMvs1AAAAAFCu3WiR3YCYcKMBACh2AKopgFJBA7Xoo4Fip1TQAEAtkmQASXZlalsAJLk/aC59AICdSQNJ7ge4DwRN0ORAbypociAHgsamliHWmlwkB7oKnZ0caH7lQA40v3LApmqRHPiBAsBCSvsOYCHFpuZkfZEcsCmbsqn2/XSbchGAHLApm3q9D6Cz07YAaB19oZWLaCAHbHoiwBf52BRADtiUTb1KAJAD384B8Gkbzx4APOyWAwAjlKCx6eQky4GgyYGgCZocAAiapSCAoLkPJBnA03QASZZkGgAoFVpHczKAWmQIVIsAAOxNARQ7AAB9kUEcQLn+/gCopgAAbjQ3Gg1cOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANV8aAAAAADwi7Pr/5+DVt2tAQAAgGK3I6oZUANEBgDQtigVACFoYQBhUwBBEzQAORA0NmVTOWBTADYlMptyEQCbEhnAOzsALjpPA88e6rJ3FUTmIi7Sm3IRF3ERkS1miaxUEFmpILJSURN6UyIT2QhlALHxIjKRiUxk+yKTPpGJbNInMpEN4sMARAawDBG06SIL2goi21UIGpFpcJlNjbFENuEQmQY0MGUaQEyZRBY0QRM0U6YpkwZEFjTrHFMmDTS/RCayKdOUacoUNH+4I2hENmX2AIhMZGMskWlgjCUyke2LNF5EJjINiExkGy8bL8uQCSIbxIlspcZFJn0iE1mpsEogsjGWi7iIi4jMRVzERfamAJaC52sAwEUANl5sCsCmXGRG89e6bEoDOWBTADmQAwBBk4MRAABJFjQAAIBqPvdrAPAGv7GBbaSCtb0AAAAASUVORK5CYII=");
background-size:contain;
width: 10px;
height: 10px;
position: fixed;
border: solid 1px white;
}
</style>
</head>
<body>
<p id="container"></p>
<script>
var container = document.getElementById("container");
adjustment = 0.5;
w=0.5; h=0.5;
for (i = 0; i < 15; ++i) {
adjustment+=0.1;
for (j = 0; j < 15; ++j) {
var e = document.createElement("div");
e.style.top = ((w + 1) * i + j * adjustment) + "px";
e.style.left = ((w + 1) * j + i * adjustment) + "px";
e.style.width = w + "px";
e.style.height = h + "px";
container.appendChild(e);
w+=0.5;
h+=0.5;
}
}
</script>
</body>
</html>