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 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=451958
5 -->
6 <head>
7 <title>Test for Bug 451958</title>
8 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
10 <script type="text/javascript" src="manifest.js"></script>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=451958">Mozilla Bug 451958</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 451958 **/
22 function run() {
23 window.open("http://example.org:80/tests/content/media/test/file_access_controls.html", "", "width=500,height=500");
24 }
26 function done() {
27 mediaTestCleanup();
28 SimpleTest.finish();
29 }
31 addLoadEvent(run);
32 SimpleTest.waitForExplicitFinish();
35 window.addEventListener("message", receiveMessage, false);
37 function receiveMessage(event)
38 {
39 if (event.origin !== "http://example.org") {
40 ok(false, "Received message from wrong domain");
41 return;
42 }
44 if (event.data.done == "true")
45 return done();
47 ok(event.data.result, event.data.message);
48 }
49 </script>
50 </pre>
51 </body>
52 </html>