layout/reftests/canvas/text-emoji-notref.html

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

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

mercurial