OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <style type="text/css"> | 3 <style type="text/css"> |
4 #container { | 4 #container { |
5 width: 200px; | 5 width: 200px; |
6 height: 100px; | 6 height: 100px; |
7 overflow: auto; | 7 overflow: auto; |
8 } | 8 } |
9 #innerBox { | 9 #innerBox { |
10 width: 200%; | 10 width: 200%; |
11 height: 100%; | 11 height: 100%; |
12 } | 12 } |
13 </style> | 13 </style> |
14 <script src="../js/resources/js-test-pre.js"></script> | 14 <script src="../../resources/js-test.js"></script> |
15 </head> | 15 </head> |
16 <body> | 16 <body> |
17 <div id="container"> | 17 <div id="container"> |
18 <div id="innerBox" style="background:green"></div> | 18 <div id="innerBox" style="background:green"></div> |
19 </div> | 19 </div> |
20 <script> | 20 <script> |
21 description('Testcase for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=1
1355">https://bugs.webkit.org/show_bug.cgi?id=11355</a>. \ | 21 description('Testcase for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=1
1355">https://bugs.webkit.org/show_bug.cgi?id=11355</a>. \ |
22 When a container having overflow:auto has a horizontal scrollbar, \ | 22 When a container having overflow:auto has a horizontal scrollbar, \ |
23 the scrollbar is to be placed between the inner border edge and the outer paddin
g edge. \ | 23 the scrollbar is to be placed between the inner border edge and the outer paddin
g edge. \ |
24 Thus the content height of a child inside the container must not include the hei
ght of the horizontal scollbars.'); | 24 Thus the content height of a child inside the container must not include the hei
ght of the horizontal scollbars.'); |
25 | 25 |
26 debug('The height of the inner element box should be 100% of the containers heig
ht minus the height of horizontal scrollbar. \ | 26 debug('The height of the inner element box should be 100% of the containers heig
ht minus the height of horizontal scrollbar. \ |
27 There should be no vertical scrollable content in the container<br>'); | 27 There should be no vertical scrollable content in the container<br>'); |
28 shouldBeTrue('document.getElementById("container").scrollHeight == document.getE
lementById("container").clientHeight'); | 28 shouldBeTrue('document.getElementById("container").scrollHeight == document.getE
lementById("container").clientHeight'); |
29 debug('Container height = Inner Box height + scrollbar height'); | 29 debug('Container height = Inner Box height + scrollbar height'); |
30 shouldBeTrue('document.getElementById("container").offsetHeight > document.getEl
ementById("innerBox").offsetHeight'); | 30 shouldBeTrue('document.getElementById("container").offsetHeight > document.getEl
ementById("innerBox").offsetHeight'); |
31 document.body.removeChild(document.getElementById('container')); | 31 document.body.removeChild(document.getElementById('container')); |
32 </script> | 32 </script> |
33 <div id="description"></div> | 33 <div id="description"></div> |
34 <div id="console"></div> | 34 <div id="console"></div> |
35 </body> | 35 </body> |
36 </html> | 36 </html> |
OLD | NEW |