Tue, 06 Jan 2015 21:39:09 +0100
Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Test that reloading media recorder object</title>
5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
7 <script type="text/javascript" src="manifest.js"></script>
8 </head>
9 <body>
10 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=894348">Mozill
11 a Bug 894348</a>
12 <pre id="test">
13 <script class="testbody" type="text/javascript">
14 for (i = 0; i< 5; i++) {
15 try { o0 = document.createElement('audio') } catch(e) { }
16 try { o0.src = "sound.ogg" } catch(e) { }
17 try { (document.body || document.documentElement).appendChild(o0) } catch(e) { }
18 try { o1 = o0.mozCaptureStreamUntilEnded(); } catch(e) { }
19 try { o2 = new MediaRecorder(o1) } catch(e) { }
20 try { o2.start(0) } catch(e) { }
21 SpecialPowers.gc();
22 }
23 ok(true, "pass the crash test");
24 </script>
25 </pre>
26 </body>
27 </html>