summaryrefslogtreecommitdiffstats
path: root/dom/media/test/crashtests/1560215.html
blob: 1b76e218d769858556c29406ac2872bfdd73302e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<html class="reftest-wait">
<head>
    <script>
      async function start () {
        const canvas = document.createElement('canvas')
        const context = canvas.getContext('2d')
        context.fillStyle = "red"
        context.fillRect(0, 0, 1, 1)
        const recorder = new MediaRecorder(
          canvas.captureStream(), { videoBitsPerSecond: 16 })
        recorder.start(100)
        await new Promise(r => recorder.onstart = r)
        recorder.pause()
        document.documentElement.removeAttribute("class")
      }

      window.addEventListener('load', start)
    </script>
</head>
</html>