| <!DOCTYPE html> |
| <html> |
| <!-- |
| | Non-positioned elements in a scroll container that is not positioned |
| | should be scrolled. |
| | https://www.w3.org/TR/CSS21/visufx.html |
| --> |
| <head> |
| <style> |
| body { |
| font-family: Roboto; |
| font-size: 16px; |
| background-color: #FF0000; |
| } |
| |
| .overflow-scroll { |
| width: 150px; |
| height: 100px; |
| overflow: scroll; |
| background-color: #000000; |
| } |
| |
| .content { |
| width: 50px; |
| height: 50px; |
| margin-bottom: 25px; |
| } |
| </style> |
| <script> |
| if (window.testRunner) { |
| window.testRunner.waitUntilDone(); |
| } |
| |
| window.onload = function() { |
| var scroller = document.getElementById("scroller"); |
| scroller.scrollTop = 25; |
| if (scroller.scrollTop != 25) { |
| console.log("FAIL" + |
| "\nValue of: scrollTop" + |
| "\n Actual: " + scroller.scrollTop + |
| "\nExpected: " + 25); |
| } else { |
| document.body.style.backgroundColor = "#FFFFFF"; |
| } |
| if (window.testRunner) { |
| window.testRunner.notifyDone(); |
| } |
| } |
| </script> |
| </head> |
| <body> |
| <div id="scroller" class="overflow-scroll"> |
| <div class="content" style="background-color: #FF0000"></div> |
| <div class="content" style="background-color: #00FF00"></div> |
| <div class="content" style="background-color: #0000FF"></div> |
| </div> |
| </body> |
| </html> |