wpt / css / css-overflow / clipped-scroller-add-content.html

Status: FAIL | Duration: 14ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-overflow/clipped-scroller-add-content.html

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#scroll-container">
<link rel="help" href="https://crbug.com/385704990">
<link rel="match" href="clipped-scroller-add-content-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<div style="height: 300px; overflow: hidden">
  <div style="height: 20px"></div>
  <div id="scroller" style="height: 300px; overflow: scroll">
    <div id="content" style="position: relative; display: none;
                             width: 300px; height: 400px; background: red">
      <div style="height: 300px; background: green"></div>
      <div style="height: 100px; background: green"></div>
    </div>
  </div>
</div>
<script>
waitForAtLeastOneFrame().then(() => {
  content.style.display = 'block';
  waitForAtLeastOneFrame().then(() => {
    scroller.scrollTo(0, 100);
    takeScreenshot();
  });
});
</script>

/css/css-overflow/clipped-scroller-add-content-ref.html

<!DOCTYPE html>
<div style="height: 300px; overflow: hidden">
  <div style="height: 20px"></div>
  <div id="scroller" style="height: 300px; overflow: scroll">
    <div style="width: 300px; height: 400px; background: green"></div>
  </div>
</div>
<script>
scroller.scrollTo(0, 100);
</script>