2 <script src=
"../../resources/js-test.js"></script>
4 <table id=
"table1" class=
"test" style=
"overflow-x: visible; overflow-y: auto"/>
5 <table id=
"table2" class=
"test" style=
"overflow-x: visible; overflow-y: scroll"/>
6 <table id=
"table3" class=
"test" style=
"overflow-x: visible; overflow-y: hidden"/>
7 <!-- For inline tables. -->
8 <table id=
"inline_table1" class=
"test" style=
"overflow-x: visible; overflow-y: auto; display: inline-table;"/>
9 <table id=
"inline_table2" class=
"test" style=
"overflow-x: visible; overflow-y: scroll; display: inline-table;"/>
10 <table id=
"inline_table3" class=
"test" style=
"overflow-x: visible; overflow-y: hidden; display: inline-table;"/>
11 <!-- For table row groups. -->
13 <tbody id=
"tbody1" class=
"test" style=
"overflow-x: visible; overflow-y: auto"/>
14 <tbody id=
"tbody2" class=
"test" style=
"overflow-x: visible; overflow-y: scroll"/>
15 <tbody id=
"tbody3" class=
"test" style=
"overflow-x: visible; overflow-y: hidden"/>
17 <!-- For table rows. -->
19 <tr id=
"tr1" class=
"test" style=
"overflow-x: visible; overflow-y: auto"/>
20 <tr id=
"tr2" class=
"test" style=
"overflow-x: visible; overflow-y: scroll"/>
21 <tr id=
"tr3" class=
"test" style=
"overflow-x: visible; overflow-y: hidden"/>
24 description("This test checks for overflow equality. If overflow-x is visible then overflow-y should be visible as well.");
25 var elements
= document
.getElementsByClassName("test");
26 for (i
= 0; i
< elements
.length
; ++i
)
28 computedStyle
= getComputedStyle(elements
[i
]);
29 overflowX
= computedStyle
.getPropertyValue('overflow-x');
30 overflowY
= computedStyle
.getPropertyValue('overflow-y');
31 if (overflowX
== "visible" && overflowX
!= overflowY
)
32 testFailed(elements
[i
].id
+ ": overflow-y should be visible. Was " + overflowY
+ ".");
34 testPassed(elements
[i
].id
+ ": overflow-x is either not visible or both overflow values are visible.");