1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/forms/textarea/resize-background-ref.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +<html> 1.5 +<script> 1.6 +function sizeResizer() { 1.7 + // reference resizer 1.8 + var img = document.getElementsByTagName("img")[0]; 1.9 + // hidden textarea 1.10 + var textarea = document.getElementsByTagName("textarea")[0]; 1.11 + var width = 200 - textarea.clientWidth; 1.12 + var height = 200 - textarea.clientHeight; 1.13 + // (Leave test failing if a scrollbar is missing) 1.14 + if (width != 0 && height != 0) { 1.15 + img.style.width = width + "px"; 1.16 + img.style.left = textarea.clientWidth + "px"; 1.17 + img.style.height = height + "px"; 1.18 + img.style.top = textarea.clientHeight + "px"; 1.19 + } 1.20 +} 1.21 +</script> 1.22 +<body onload="sizeResizer()"> 1.23 +<textarea style="width: 200px; height: 200px; margin: 0; border: none; 1.24 + background: red; font-size: 400px;"> 1.25 +M 1.26 +</textarea> 1.27 +<div style="position: relative; top: -200px; 1.28 + width: 200px; height: 200px; margin: 0; border: none; 1.29 + background: lightgreen"> 1.30 + <img style="position: relative;" src="chrome://global/skin/icons/resizer.png"> 1.31 +</div> 1.32 +</body> 1.33 +</html>