layout/reftests/canvas/text-emoji.html

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     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 \uD83D\uDE0E'; // U+1F60E
    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