Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
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=552605
5 -->
6 <head>
7 <title>Test for Bug 552605</title>
8 <script type="application/javascript" src="/MochiKit/MochiKit.js"></script>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=552605">Mozilla Bug 552605</a>
15 <p id="display"></p>
16 <pre id="test">
17 <script type="application/javascript">
19 var count = 0;
21 SimpleTest.waitForExplicitFinish();
23 function check()
24 {
25 count++;
26 if (count != 2)
27 return;
29 var image1 = document.getElementById('test-image1');
30 var image2 = document.getElementById('test-image2');
31 var first = document.createElement('canvas')
32 var ctx = first.getContext('2d');
33 ctx.drawImage(image1, 0, 0);
35 var second = document.createElement('canvas');
36 ctx = second.getContext('2d');
37 ctx.drawImage(image2, 0, 0);
39 // Check that the images are the same, since they're in the same document.
40 [correct, val1, val2] = compareSnapshots(first, second, true);
41 ok(correct, "Image should be the same for all loads.");
43 SimpleTest.finish();
44 }
46 </script>
47 </pre>
48 <div id="content"> <!-- style="display: none" -->
49 <img src="bug552605.sjs" onload="check()" id="test-image1"></iframe>
50 <img src="bug552605.sjs" onload="check()" id="test-image2"></iframe>
51 </div>
52 </body>
53 </html>