tbb-tests/test_tor_bug5856.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tbb-tests/test_tor_bug5856.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +Tor bug
     1.8 +https://trac.torproject.org/projects/tor/ticket/5856
     1.9 +-->
    1.10 +<head>
    1.11 +  <meta charset="utf-8">
    1.12 +  <title>Test for Tor Bug #5856: Do not expose physical screen info via window & window.screen.</title>
    1.13 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.14 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.15 +  <script type="application/javascript">
    1.16 +  var checkPair = function ([a, b]) {
    1.17 +    is(eval(a), eval(b), a + " should return " + b);
    1.18 +  }
    1.19 +  var pairs = [
    1.20 +    ["window.screenX", 0],
    1.21 +    ["window.screenY", 0],
    1.22 +    ["window.mozInnerScreenX", 0],
    1.23 +    ["window.mozInnerScreenY", 0],
    1.24 +    ["window.screen.pixelDepth", 24],
    1.25 +    ["window.screen.colorDepth", 24],
    1.26 +    ["window.screen.availWidth", "window.innerWidth"],
    1.27 +    ["window.screen.availHeight", "window.innerHeight"],
    1.28 +    ["window.screen.left", 0],
    1.29 +    ["window.screen.top", 0],
    1.30 +    ["window.screen.availLeft", 0],
    1.31 +    ["window.screen.availTop", 0],
    1.32 +    ["window.screen.width", "window.innerWidth"],
    1.33 +    ["window.screen.height", "window.innerHeight"]
    1.34 +  ];
    1.35 +
    1.36 +  pairs.map(checkPair);
    1.37 +
    1.38 +  </script>
    1.39 +</head>
    1.40 +<body>
    1.41 +<a target="_blank" href="https://trac.torproject.org/projects/tor/ticket/5856">Tor Bug 5856</a>
    1.42 +<p id="display"></p>
    1.43 +<div id="content" style="display: none">
    1.44 +
    1.45 +</div>
    1.46 +<pre id="test">
    1.47 +</pre>
    1.48 +</body>
    1.49 +</html>

mercurial