| <!DOCTYPE html> |
| <script src=../../resources/js-test.js></script> |
| <style> |
| #container { |
| overflow: scroll |
| } |
| .inner { |
| width: 2000px; |
| height: 50px; |
| } |
| </style> |
| <p>This tests that an accessibility controller scroll update notification which |
| removes the scroller from the DOM does not crash the browser.</p> |
| <div id="container"> |
| <div class="inner"></div> |
| </div> |
| <script> |
| description("Scrollable area removed on scroll"); |
| |
| window.jsTestIsAsync = true; |
| |
| accessibilityController.addNotificationListener(function (evt, type) { |
| if (!window.container || type != "LayoutComplete") |
| return; |
| container.parentNode.removeChild(container); |
| setTimeout(function(){ |
| finishJSTest(); |
| }, 0); |
| }); |
| |
| setTimeout(function() { |
| container.scrollLeft = 500; |
| }, 0); |
| </script> |