Bug 1210057. Make test_moz_mouse_pixel_scroll_event.html wait for a paint after adding a apz aware (MozMousePixelScroll) event listener. r=kats

Adding an apz aware event listener will change the event regions on the layer tree, so we want to wait until that has happened before running the test.
This commit is contained in:
Timothy Nikkel 2016-02-10 17:47:58 -06:00
Родитель 2970550b4e
Коммит 7f52ab42ea
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -4,6 +4,7 @@
<title>Test for MozMousePixelScroll events</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/paint_listener.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<style>
.scrollable {
@ -63,6 +64,8 @@ function* prepareScrollUnits()
}
window.addEventListener("MozMousePixelScroll", handler, true);
yield waitForAllPaints(function () { setTimeout(runTest, 0); });
yield synthesizeWheel(gScrollable128, 10, 10,
{ deltaMode: WheelEvent.DOM_DELTA_LINE,
deltaY: 1.0, lineOrPageDeltaY: 1 });