layout/reftests/canvas/image-rendering-test.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

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 <!--
     3     Any copyright is dedicated to the Public Domain.
     4     http://creativecommons.org/licenses/publicdomain/
     5   -->
     6 <html reftest-zoom="2" class="reftest-wait">
     7 <head>
     8   <title>test image-rendering</title>
     9   <style>
    10     canvas { position:absolute;left:0px;top:0px; }
    11   </style>
    12   <script type="text/javascript">
    13     document.addEventListener("MozReftestInvalidate", draw, false);
    15     function draw() {
    16         var canvas = document.getElementById("canvas");
    17         var ctx = canvas.getContext("2d");
    18         ctx.fillStyle = "rgb(255,0,0)";
    19         ctx.fillRect(25,25,100,100);
    20         ctx.fillStyle = "rgb(0,255,0)";
    21         ctx.fillRect(25,25,50,50);
    22         document.documentElement.removeAttribute('class');
    23     }
    24   </script>
    25 </head>
    26 <body>
    27   <canvas style="image-rendering: -moz-crisp-edges; " id="canvas" width="300" height="300"></canvas>
    28 </body>
    29 </html>

mercurial