mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-09 12:51:09 +02:00
Automatic update from web-platform-tests
Adjust infinite-scroll-event to pass.
scrollTopMax is not a standardized web feature. The actual
functionality was passing as of:
6a9dd6d267
Bug: 997502
Change-Id: Ic120d09d0e6a9652c195afe0ac7cacece917dd47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1949556
Reviewed-by: Nick Burris <nburris@chromium.org>
Commit-Queue: Chris Harrelson <chrishtr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721318}
--
wpt-commits: 3f1485cc2793f55236076dfffc3c3fa69315e101
wpt-pr: 20600
39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
<!DOCTYPE html>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
|
|
<link rel="author" title="Mozilla" href="https://mozilla.org">
|
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1561450">
|
|
<link rel="help" href="https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers">
|
|
<style>
|
|
body { margin: 0 }
|
|
.content {
|
|
height: 45vh;
|
|
background: lightblue;
|
|
}
|
|
</style>
|
|
<div class="content"></div>
|
|
<div id="hidden" style="display: none; height: 200px"></div>
|
|
<div class="content"></div>
|
|
<div class="content"></div>
|
|
<div class="content"></div>
|
|
<script>
|
|
let first = true;
|
|
const t = async_test("Scroll adjustments don't happen if triggered from scroll event listeners");
|
|
onscroll = t.step_func(function() {
|
|
assert_true(first, "Should only get one event");
|
|
first = false;
|
|
hidden.style.display = "block";
|
|
hidden.offsetTop;
|
|
hidden.style.display = "none";
|
|
requestAnimationFrame(t.step_func(function() {
|
|
requestAnimationFrame(t.step_func(function() {
|
|
t.done();
|
|
}));
|
|
}));
|
|
});
|
|
window.onload = t.step_func(function() {
|
|
window.scrollTo(0, document.documentElement.scrollHeight);
|
|
window.scrollBy(0, -200);
|
|
});
|
|
</script>
|