зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1846935
- In helper_relative_scroll_smoothness, relax the expectation on scroll offsets from strictly increasing to non-decreasing for MSD physics. r=hiro
Depends on D195351 Differential Revision: https://phabricator.services.mozilla.com/D195352
This commit is contained in:
Родитель
750a4885f8
Коммит
2e086fbfa6
|
@ -1971,11 +1971,15 @@ function buildRelativeScrollSmoothnessVariants(aInputType, aScrollMethods) {
|
|||
let subtests = [];
|
||||
for (let scrollMethod of aScrollMethods) {
|
||||
subtests.push({
|
||||
file: `helper_relative_scroll_smoothness.html?input-type=${aInputType}&scroll-method=${scrollMethod}`,
|
||||
prefs: getSmoothScrollPrefs(aInputType, /* Bezier physics */ false)
|
||||
file: `helper_relative_scroll_smoothness.html?input-type=${aInputType}&scroll-method=${scrollMethod}&strict=true`,
|
||||
prefs: getSmoothScrollPrefs(aInputType, /* Bezier physics */ false),
|
||||
});
|
||||
// For MSD physics, run the test with strict=false. The shape of the
|
||||
// animation curve is highly timing dependent, and we can't guarantee
|
||||
// that an animation will run long enough until the next input event
|
||||
// arrives.
|
||||
subtests.push({
|
||||
file: `helper_relative_scroll_smoothness.html?input-type=${aInputType}&scroll-method=${scrollMethod}`,
|
||||
file: `helper_relative_scroll_smoothness.html?input-type=${aInputType}&scroll-method=${scrollMethod}&strict=false`,
|
||||
prefs: getSmoothScrollPrefs(aInputType, /* MSD physics */ true),
|
||||
});
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ body {
|
|||
|
||||
<script>
|
||||
const searchParams = new URLSearchParams(location.search);
|
||||
let strict = searchParams.get("strict") == "true";
|
||||
|
||||
var intervalId;
|
||||
// Start periodic content expansions after we get a scroll event triggered by
|
||||
// a key press in test() function below, otherwise we may have same scroll
|
||||
|
@ -105,8 +107,11 @@ async function test() {
|
|||
continue;
|
||||
}
|
||||
ok(
|
||||
record.scrollOffsetY > previousRecord.scrollOffsetY,
|
||||
"scroll offset should be strictly monotonically increasing " +
|
||||
strict
|
||||
? (record.scrollOffsetY > previousRecord.scrollOffsetY)
|
||||
: (record.scrollOffsetY >= previousRecord.scrollOffsetY),
|
||||
"scroll offset should be " +
|
||||
(strict ? "strictly monotonically increasing " : "nondecreasing ") +
|
||||
"previous offset: " + previousRecord.scrollOffsetY +
|
||||
", offset: " + record.scrollOffsetY
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче