| <script src="../../resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| var test = async_test('Verify that a scroll event gets fired on window.visualViewport when its offset changes'); |
| function scrollEventHandler() { |
| function doAfterZooming() { |
| window.visualViewport.addEventListener('scroll', scrollEventHandler); |
| window.scrollTo(1000, 1000); |
| uiController.zoomToScale(${pageScaleFactor}, function() { |
| uiController.uiScriptComplete(uiController.zoomScale); |
| window.onload = function() { |
| testRunner.runUIScript(getUIScript(), doAfterZooming); |