зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374790 - Wait until APZ is ready before sending it a wheel event. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D9567 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
47bca53d01
Коммит
bad6bf49d6
|
@ -17,6 +17,7 @@ support-files =
|
|||
file_SlowImage.sjs
|
||||
file_SlowPage.sjs
|
||||
bug1174521.html
|
||||
!/gfx/layers/apz/test/mochitest/apz_test_utils.js
|
||||
|
||||
[test_bug240933.html]
|
||||
[test_bug263683.html]
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
||||
<script src="/tests/SimpleTest/paint_listener.js"></script>
|
||||
<script src="/tests/gfx/layers/apz/test/mochitest/apz_test_utils.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
@ -40,13 +41,16 @@ function doneScroll() {
|
|||
outer.scrollTop = 0;
|
||||
break;
|
||||
case 2:
|
||||
// Wait for paints to flush, so APZ is notified of the new scroll offset.
|
||||
sendWheelAndPaint(inner, 4, 4,
|
||||
{ deltaMode: WheelEvent.DOM_DELTA_LINE, deltaY: 1 },
|
||||
function() {
|
||||
wheelAndPaintDone = true;
|
||||
doneTest();
|
||||
});
|
||||
// wait until APZ is ready to handle the wheel event, then send it
|
||||
waitForApzFlushedRepaints(() => {
|
||||
// Wait for paints to flush, so APZ is notified of the new scroll offset.
|
||||
sendWheelAndPaint(inner, 4, 4,
|
||||
{ deltaMode: WheelEvent.DOM_DELTA_LINE, deltaY: 1 },
|
||||
function() {
|
||||
wheelAndPaintDone = true;
|
||||
doneTest();
|
||||
});
|
||||
});
|
||||
break;
|
||||
case 3:
|
||||
is(innerScrollOffset(), innerStartScrollOffset, "Inner element should not have scrolled down");
|
||||
|
|
Загрузка…
Ссылка в новой задаче