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 for language-sensitive font prefs on canvas</title>
5 <script type="text/javascript">
6 function test(canvasID) {
7 var canvas = document.getElementById(canvasID);
8 var ctx = canvas.getContext('2d');
10 var str = 'Hello world! \u4F60\u597D\u5417\uFF1F';
11 ctx.font = '2em sans-serif';
12 ctx.fillStyle = 'black';
13 ctx.textAlign = 'left';
14 ctx.textBaseline = 'top';
15 ctx.fillText(str, 10, 10);
16 };
17 </script>
18 </head>
19 <body>
21 <div lang="en" style="margin:20px; height:100px;">
22 <canvas id="c1" width="400" height="50"></canvas>
23 <script type="text/javascript">
24 test("c1");
25 </script>
26 </div>
28 <div lang="en" style="margin:20px; height:100px;">
29 <canvas id="c2" width="400" height="50"></canvas>
30 <script type="text/javascript">
31 test("c2");
32 </script>
33 </div>
35 <div lang="en" style="margin:20px; height:100px;">
36 <canvas id="c3" width="400" height="50"></canvas>
37 <script type="text/javascript">
38 test("c3");
39 </script>
40 </div>
42 <div lang="en" style="margin:20px; height:100px;">
43 <canvas id="c4" width="400" height="50"></canvas>
44 <script type="text/javascript">
45 test("c4");
46 </script>
47 </div>
49 </body>
50 </html>