Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / css / getComputedStyle / computed-style-select-overflow.html
blobe7c89e69925f8549e61164969a414a9dd08ebc01
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <script src="../../../resources/js-test.js"></script>
6 </head>
7 <body>
8 <p>Test computed style for the overflow property of select element</p>
9 <div id="console"></div>
11 <div id="test">
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>
23 </select>
24 </div>
26 <script>
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;
53 </script>
54 </body>
55 </html>