5 <script src=
"../../../resources/js-test.js"></script>
8 <p>Test computed style for the overflow property of select element
</p>
9 <div id=
"console"></div>
12 <select id=
"wut" name=
"wut" size=
"8">
13 <option value=
"1">One
</option>
14 <option value=
"2">Two
</option>
15 <option value=
"3">Three
</option>
16 <option value=
"4">Four
</option>
17 <option value=
"5">Five
</option>
18 <option value=
"6">Six
</option>
19 <option value=
"7">Seven
</option>
20 <option value=
"8">Eight
</option>
21 <option value=
"9">Nine
</option>
22 <option value=
"10">Ten
</option>
29 function computedOverflowStyle(overflowStyle
, property
) {
30 var selectElement
= document
.getElementById("wut");
31 selectElement
.style
.overflow
= overflowStyle
;
32 return window
.getComputedStyle(selectElement
).getPropertyValue(property
);
35 function computedInheritedOverflowStyle(overflowStyle
, property
) {
36 var divElement
= document
.getElementById("test");
37 divElement
.style
.overflow
= 'scroll';
39 var selectElement
= document
.getElementById("wut");
40 selectElement
.style
.overflow
= overflowStyle
;
41 return window
.getComputedStyle(selectElement
).getPropertyValue(property
);
44 shouldBe("computedOverflowStyle('scroll', 'overflow-x')", "'scroll'");
45 shouldBe("computedOverflowStyle('scroll', 'overflow-y')", "'scroll'");
47 shouldBe("computedInheritedOverflowStyle('inherit', 'overflow-x')", "'scroll'");
48 shouldBe("computedInheritedOverflowStyle('inherit', 'overflow-y')", "'scroll'");
51 var successfullyParsed
= true;