1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/generic/test/test_bug841361.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,56 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=841361 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 841361</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 +</head> 1.14 +<body> 1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=841361">Mozilla Bug 841361</a> 1.16 +<p id="display"> 1.17 + 1.18 +<div style="width:500px; height:0;" id="a"></div> 1.19 + 1.20 +<div style="width:0; height:500px;" id="b"></div> 1.21 + 1.22 +<div style="width:500px;" id="c"> 1.23 + <div style="width:50px; height:50px; float:left; background:yellow"></div> 1.24 + <div style="width:200px; height:50px; float:left; background:green"></div> 1.25 +</div> 1.26 + 1.27 +<div style="width:500px; height:0; overflow:hidden" id="d"></div> 1.28 + 1.29 +<div style="width:0; height:500px; overflow:hidden" id="e"></div> 1.30 + 1.31 +<div style="width:500px; overflow:hidden" id="f"> 1.32 + <div style="width:50px; height:50px; float:left; background:yellow"></div> 1.33 + <div style="width:200px; height:50px; float:left; background:green"></div> 1.34 +</div> 1.35 + 1.36 +</p> 1.37 +<div id="content" style="display: none"> 1.38 + 1.39 +</div> 1.40 +<pre id="test"> 1.41 +<script class="testbody" type="text/javascript"> 1.42 + 1.43 +function doTest(id, w, h) { 1.44 + var e = document.getElementById(id); 1.45 + is(e.scrollWidth, w, "scrollWidth for element '" + id + "'"); 1.46 + is(e.scrollHeight, h, "scrollHeight for element '" + id + "'"); 1.47 +} 1.48 + 1.49 +doTest("a", 500, 0); 1.50 +doTest("b", 0, 500); 1.51 +doTest("c", 500, 50); 1.52 +doTest("d", 500, 0); 1.53 +doTest("e", 0, 500); 1.54 +doTest("f", 500, 50); 1.55 + 1.56 +</script> 1.57 +</pre> 1.58 +</body> 1.59 +</html>