| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../resources/check-layout.js"></script> |
| <style type="text/css"> |
| ::-webkit-scrollbar { |
| width: 10px; |
| height: 10px; |
| } |
| ::-webkit-scrollbar-thumb { |
| border-radius: 4px; |
| background-color: #CCCCCC; |
| -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5); |
| } |
| div { |
| position: absolute; |
| top: 200px; |
| left: 0px; |
| background-color: red; |
| width: 200px; |
| height: 150px; |
| padding: 0px; |
| overflow: scroll; |
| visibility: hidden; |
| } |
| #scrollChild { |
| width: 150%; |
| height: 200px; |
| padding: 0px; |
| } |
| </style> |
| </head> |
| <body> |
| Tests that element.clientWidth of visible element with scrollbars returns proper values |
| <div id="scrollDiv" data-expected-client-width="190"><p id="scrollChild"></p></div> |
| <p id="test-output"></p> |
| </body> |
| <script type="text/javascript"> |
| window.checkLayout("div", document.getElementById("test-output")); |
| </script> |
| </html> |