зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685829 - Migrate test_bug1304689-2.html to async/await style. r=botond
Depends on D101279 Differential Revision: https://phabricator.services.mozilla.com/D101280
This commit is contained in:
Родитель
c8ab239536
Коммит
38397ae6f6
|
@ -30,15 +30,14 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1304689
|
|||
</style>
|
||||
<script type="application/javascript">
|
||||
|
||||
function* test(testDriver) {
|
||||
async function test() {
|
||||
var utils = SpecialPowers.DOMWindowUtils;
|
||||
var elm = document.getElementById("outer");
|
||||
|
||||
// Set margins on the element, to ensure it is layerized
|
||||
utils.setDisplayPortMarginsForElement(0, 0, 0, 0, elm, /* priority*/ 1);
|
||||
yield waitForAllPaints(function() {
|
||||
flushApzRepaints(testDriver);
|
||||
});
|
||||
await promiseAllPaintsDone();
|
||||
await promiseApzRepaintsFlushed();
|
||||
|
||||
// Take control of the refresh driver
|
||||
utils.advanceTimeAndRefresh(0);
|
||||
|
@ -63,7 +62,7 @@ function* test(testDriver) {
|
|||
}
|
||||
utils.restoreNormalRefresh();
|
||||
|
||||
yield flushApzRepaints(testDriver);
|
||||
await promiseApzRepaintsFlushed();
|
||||
is(elm.scrollTop, 100, "The scrollTop now should be y=100");
|
||||
}
|
||||
|
||||
|
@ -71,7 +70,7 @@ if (isApzEnabled()) {
|
|||
SimpleTest.waitForExplicitFinish();
|
||||
pushPrefs([["apz.displayport_expiry_ms", 0]])
|
||||
.then(waitUntilApzStable)
|
||||
.then(runContinuation(test))
|
||||
.then(test)
|
||||
.then(SimpleTest.finish, SimpleTest.finishWithFailure);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче