image/test/reftest/pngsuite-background/wrapper.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 class="reftest-wait">
     3 <head>
     4 <title>Image reftest wrapper</title>
     5 <style type="text/css">
     6   #image1 { background-color: rgb(10, 100, 250); }
     7 </style>
     8 <script>
     9   // The image is loaded async after the page loads
    10   // wait for it to finish loading
    11   function onImageLoad() { 
    12     document.documentElement.removeAttribute("class");
    13   };
    14 </script>
    15 </head>
    16 <body>
    17 <img id="image1">
    18 <script>
    19   // Use as "wrapper.html?image.png
    20   var imgURL = document.location.search.substr(1);
    21   document.images[0].onload = onImageLoad;
    22   document.images[0].onerror = onImageLoad;
    23   document.images[0].src = imgURL;
    24 </script>
    25 </body>
    26 </html>

mercurial