summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-animations/keyframes-remove-documentElement-crash.html
blob: 9573ce1b0f8d1a413c0fb609207c5d98350053d6 (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
25
26
27
28
<!doctype html>
<html class="test-wait">
<title>CSS Animations Test: Chrome crash when removing documentElement and @keyframes stylesheet</title>
<link rel="help" href="https://crbug.com/999522">
<style>
  @keyframes anim {
    from { color: pink }
    to { color: purple }
  }
  div {
    animation: notfound 1s;
  }
</style>
<div></div>
<script>
window.addEventListener('load', () => {
  document.body.offsetTop;
  document.querySelector("style").remove();
  // We need the root later to remove the test-wait class.
  const root = document.documentElement;
  document.documentElement.remove();

  // rAF to make sure that style runs.
  requestAnimationFrame(() => {
    root.classList.remove('test-wait');
  });
});
</script>