summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/overflow/child-100percent-height-inside-fixed-container-with-overflow-auto.html
blob: 48ec98f7edeeb1581345764d499d1cb78cc03243 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<html>
<head>
<style type="text/css">
#container {
	width: 200px;
	height: 100px;
	overflow: auto; 
}
#innerBox {
	width: 200%;
	height: 100%;
}
</style>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<div id="container">
	<div id="innerBox" style="background:green"></div>
</div>
<script>
description('Testcase for bug <a href="https://bugs.webkit.org/show_bug.cgi?id=11355">https://bugs.webkit.org/show_bug.cgi?id=11355</a>. \
When a container having overflow:auto has a horizontal scrollbar, \
the scrollbar is to be placed between the inner border edge and the outer padding edge. \
Thus the content height of a child inside the container must not include the height of the horizontal scollbars.');

debug('The height of the inner element box should be 100% of the containers height minus the height of horizontal scrollbar. \
There should be no vertical scrollable content in the container<br>');
shouldBeTrue('document.getElementById("container").scrollHeight == document.getElementById("container").clientHeight');
debug('Container height = Inner Box height + scrollbar height');
shouldBeTrue('document.getElementById("container").offsetHeight > document.getElementById("innerBox").offsetHeight');
document.body.removeChild(document.getElementById('container'));
</script>
<div id="description"></div>
<div id="console"></div>
</body>
</html>