зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1685829 - Migrate test_bug1277814.html to async/await style. r=botond
Depends on D101278 Differential Revision: https://phabricator.services.mozilla.com/D101279
This commit is contained in:
Родитель
30ea9423da
Коммит
c8ab239536
|
@ -12,7 +12,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1277814
|
||||||
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
<script type="application/javascript" src="apz_test_native_event_utils.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
function* test(testDriver) {
|
async function test() {
|
||||||
// Trigger the buggy scenario
|
// Trigger the buggy scenario
|
||||||
var subframe = document.getElementById("bug1277814-div");
|
var subframe = document.getElementById("bug1277814-div");
|
||||||
subframe.classList.add("a");
|
subframe.classList.add("a");
|
||||||
|
@ -26,16 +26,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1277814
|
||||||
|
|
||||||
// Wait for the layer tree with any updated dispatch-to-content region to
|
// Wait for the layer tree with any updated dispatch-to-content region to
|
||||||
// get pushed over to the APZ
|
// get pushed over to the APZ
|
||||||
yield waitForAllPaints(function() {
|
await promiseAllPaintsDone();
|
||||||
flushApzRepaints(testDriver);
|
await promiseApzRepaintsFlushed();
|
||||||
});
|
|
||||||
|
|
||||||
// Trigger layerization of the subframe by scrolling the wheel over it
|
// Trigger layerization of the subframe by scrolling the wheel over it
|
||||||
yield moveMouseAndScrollWheelOver(subframe, 10, 10, testDriver);
|
await promiseMoveMouseAndScrollWheelOver(subframe, 10, 10);
|
||||||
|
|
||||||
// Give APZ the chance to compute a displayport, and content
|
// Give APZ the chance to compute a displayport, and content
|
||||||
// to render based on it.
|
// to render based on it.
|
||||||
yield waitForApzFlushedRepaints(testDriver);
|
await promiseApzFlushedRepaints();
|
||||||
|
|
||||||
// Examine the content-side APZ test data
|
// Examine the content-side APZ test data
|
||||||
var contentTestData = utils.getContentAPZTestData();
|
var contentTestData = utils.getContentAPZTestData();
|
||||||
|
@ -64,7 +63,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1277814
|
||||||
|
|
||||||
pushPrefs([["apz.test.logging_enabled", true]])
|
pushPrefs([["apz.test.logging_enabled", true]])
|
||||||
.then(waitUntilApzStable)
|
.then(waitUntilApzStable)
|
||||||
.then(runContinuation(test))
|
.then(test)
|
||||||
.then(SimpleTest.finish, SimpleTest.finishWithFailure);
|
.then(SimpleTest.finish, SimpleTest.finishWithFailure);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
Загрузка…
Ссылка в новой задаче