summaryrefslogtreecommitdiffstats
path: root/dom/media/test/test_mediarecorder_reload_crash.html
blob: f6d008261f01c7b014ec6424381abc0016123ab9 (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
29
<!DOCTYPE HTML>
<html>
<head>
  <title>Test that reloading media recorder object</title>
  <script src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
  <script type="text/javascript" src="manifest.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=894348">Mozill
a Bug 894348</a>
<pre id="test">
<script class="testbody" type="text/javascript">
  for (let i = 0; i< 5; i++) {
    /* eslint-disable no-undef */
    try { o0 = document.createElement('audio') } catch(e) { }
    try { o0.src = "sound.ogg" } catch(e) { }
    try { (document.body || document.documentElement).appendChild(o0) } catch(e) { }
    try { o1 = o0.mozCaptureStreamUntilEnded(); } catch(e) { }
    try { o2 = new MediaRecorder(o1) } catch(e) { }
    try { o2.start(0) } catch(e) { }
    /* eslint-enable no-undef */
    SpecialPowers.gc();
  }
  ok(true, "pass the crash test");
</script>
</pre>
</body>
</html>