Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 Tor bug
5 https://trac.torproject.org/projects/tor/ticket/5856
6 -->
7 <head>
8 <meta charset="utf-8">
9 <title>Test for Tor Bug #5856: Do not expose physical screen info via window & window.screen.</title>
10 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 <script type="application/javascript">
13 var checkPair = function ([a, b]) {
14 is(eval(a), eval(b), a + " should return " + b);
15 }
16 var pairs = [
17 ["window.screenX", 0],
18 ["window.screenY", 0],
19 ["window.mozInnerScreenX", 0],
20 ["window.mozInnerScreenY", 0],
21 ["window.screen.pixelDepth", 24],
22 ["window.screen.colorDepth", 24],
23 ["window.screen.availWidth", "window.innerWidth"],
24 ["window.screen.availHeight", "window.innerHeight"],
25 ["window.screen.left", 0],
26 ["window.screen.top", 0],
27 ["window.screen.availLeft", 0],
28 ["window.screen.availTop", 0],
29 ["window.screen.width", "window.innerWidth"],
30 ["window.screen.height", "window.innerHeight"]
31 ];
33 pairs.map(checkPair);
35 </script>
36 </head>
37 <body>
38 <a target="_blank" href="https://trac.torproject.org/projects/tor/ticket/5856">Tor Bug 5856</a>
39 <p id="display"></p>
40 <div id="content" style="display: none">
42 </div>
43 <pre id="test">
44 </pre>
45 </body>
46 </html>