summaryrefslogtreecommitdiffstats
path: root/dom/media/tests/crashtests/1348381.html
blob: b872e58794ceb52482b05419a6fef42803baa3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html class="reftest-wait">
<head>
  <title>Bug 1348381: Crash when recording extremely large canvas' captureStream</title>
</head>
</body>
<canvas id="c" height="0.6"></canvas>
<img id="img" src="data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="></img>
<script type="application/javascript">
const c = document.getElementById("c");
const ctx = c.getContext('2d');
const s = c.captureStream(0);
const mr = new MediaRecorder(s);
const t = s.getVideoTracks()[0];
mr.start();
const img = document.getElementById('img');
t.enabled = false;
ctx.drawImage(img, 16, 18014398509481984);
setTimeout(() => document.documentElement.removeAttribute("class"), 100);
</script>
</body>
</html>