image/test/reftest/colordepth.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 <script>
     2 /*
     3  * Almost all of the image decoding reftests require the display to be in
     4  * 24-bit color mode, or else the rendered images will have subtle color
     5  * variations and will fail.
     6  * The Windows test boxes used to have a tendency to flip to 16-bit color mode,
     7  * so this test will explicitly check the color depth to make it more obvious
     8  * when the requirement is not met. (See bug 414720.)
     9  * 24-bit is only a minimum, allow higher values too. (See bug 458847.)
    10  */
    12 var colorDepth = window.screen.colorDepth;
    14 if (colorDepth < 24)
    15     document.write("ERROR: color depth is only " + colorDepth + ".");
    16 </script>

mercurial