summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/scroll-animations/scroll-timelines/null-scroll-source-crash.html
blob: 53ad0d92850992ca00b157f83b7d45c867c3f475 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1088319">
<meta name="assert" content="Playing animation with null scroll source should not crash.">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  html {
    overflow: scroll;
  }

  body {
    overflow: scroll;
  }
</style>
<div id="box"></div>
<script>
  test(() => {
    const effect = new KeyframeEffect(box, []);
    const timeline = new ScrollTimeline();
    const animation = new Animation(effect, timeline);
    assert_equals(document.scrollingElement, null,
      "This test relies on scrolling element being nil");
    animation.play();
  }, "Playing animation with null scroll source should not crash");
</script>