| <!DOCTYPE html> |
| <script src="../../resources/js-test.js"></script> |
| <style> |
| #inner { |
| background:red; |
| width:500px; |
| height:100%; |
| } |
| |
| #outer { |
| width:300px; |
| height:500px; |
| overflow-y:scroll; |
| overflow-x:hidden; |
| } |
| </style> |
| <div id="outer"> |
| <div id="inner"> |
| </div> |
| </div> |
| |
| <script> |
| description("Ensures that if layout is dirty, triggering a scroll causes a relayout"); |
| internals.settings.setScrollAnimatorEnabled(false); |
| |
| outer.addEventListener("wheel", |
| function(e) { |
| inner.style.height = "1000px"; |
| } |
| ); |
| |
| var x = outer.offsetLeft + 5; |
| var y = outer.offsetTop + 5; |
| eventSender.mouseMoveTo(x, y); |
| eventSender.mouseScrollBy(0, -1); |
| shouldBeGreaterThan("outer.scrollTop", "0"); |
| |
| </script> |