Bug 1685209 - Migrate helper_scroll_tables_perspective.html to async/await style. r=botond

Depends on D100897

Differential Revision: https://phabricator.services.mozilla.com/D100898
This commit is contained in:
Kartikaya Gupta 2021-01-07 02:47:13 +00:00
Родитель a1f3b93e8a
Коммит 6500ffef68
1 изменённых файлов: 3 добавлений и 3 удалений

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

@ -4,18 +4,18 @@
<script type="application/javascript" src="apz_test_utils.js"></script>
<script src="/tests/SimpleTest/paint_listener.js"></script>
<script type="application/javascript">
function* test(testDriver) {
async function test() {
var subframe = document.getElementById("content-wrapper");
// scroll over the middle of the subframe, to make sure it scrolls,
// not the page
var scrollPos = subframe.scrollTop;
yield moveMouseAndScrollWheelOver(subframe, 100, 100, testDriver);
await promiseMoveMouseAndScrollWheelOver(subframe, 100, 100);
ok(subframe.scrollTop > scrollPos, "subframe scrolled after wheeling over it");
}
waitUntilApzStable()
.then(runContinuation(test))
.then(test)
.then(subtestDone, subtestFailed);
</script>