OLD | NEW |
---|---|
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/js-test.js"></script> | 2 <head> |
Srirama
2016/08/10 11:04:38
nit: html, head and body elements are options, so
MuVen
2016/08/10 11:40:58
On 2016/08/10 11:04:38, Srirama wrote:
> nit: html
| |
3 <title>Make sure a parent block that fits content expands when a child adds an a uto scrollbar.</title> | |
4 </head> | |
5 <script src="../resources/testharness.js"></script> | |
6 <script src="../resources/testharnessreport.js"></script> | |
3 <div id="top" style="float:left; display:none;"> | 7 <div id="top" style="float:left; display:none;"> |
4 <div id="scroller" style="overflow: auto; height: 100px;"> | 8 <div id="scroller" style="overflow: auto; height: 100px;"> |
5 <div style="width: 100px; height: 200px; border: 2px solid blue;"></div> | 9 <div style="width: 100px; height: 200px; border: 2px solid blue;"></div> |
6 </div> | 10 </div> |
7 </div> | 11 </div> |
8 | |
9 <script> | 12 <script> |
10 description("Make sure a parent block that fits content expands when a child add s an auto scrollbar."); | 13 test(function(){ |
Srirama
2016/08/10 11:04:39
nit: add space between () and {
MuVen
2016/08/10 11:40:59
Done.
| |
11 | 14 var topDiv = document.getElementById("top"); |
12 var topDiv = document.getElementById("top"); | 15 var scroller = document.getElementById("scroller"); |
13 var scroller = document.getElementById("scroller"); | 16 topDiv.style.display = "block"; |
14 topDiv.style.display = "block"; | 17 topDiv.offsetTop; |
15 topDiv.offsetTop; | 18 assert_equals(scroller.clientWidth, scroller.scrollWidth); |
16 shouldBe("scroller.clientWidth", "scroller.scrollWidth"); | 19 }); |
17 </script> | 20 </script> |
OLD | NEW |