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.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <head> |
michael@0 | 4 | <title>Test for Unicode emoji in canvas</title> |
michael@0 | 5 | <script type="text/javascript"> |
michael@0 | 6 | function test(canvasID) { |
michael@0 | 7 | var canvas = document.getElementById(canvasID); |
michael@0 | 8 | var ctx = canvas.getContext('2d'); |
michael@0 | 9 | var str = 'Hello \uD83D\uDE0E'; // U+1F60E |
michael@0 | 10 | ctx.font = '2em sans-serif'; |
michael@0 | 11 | ctx.fillStyle = 'black'; |
michael@0 | 12 | ctx.textAlign = 'left'; |
michael@0 | 13 | ctx.textBaseline = 'top'; |
michael@0 | 14 | ctx.fillText(str, 10, 10); |
michael@0 | 15 | }; |
michael@0 | 16 | </script> |
michael@0 | 17 | </head> |
michael@0 | 18 | <body> |
michael@0 | 19 | |
michael@0 | 20 | <div lang="en" style="margin:20px; height:100px;"> |
michael@0 | 21 | <canvas id="c1" width="400" height="50"></canvas> |
michael@0 | 22 | <script type="text/javascript"> |
michael@0 | 23 | test("c1"); |
michael@0 | 24 | </script> |
michael@0 | 25 | </div> |
michael@0 | 26 | |
michael@0 | 27 | </body> |
michael@0 | 28 | </html> |