Tue, 06 Jan 2015 21:39:09 +0100
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 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=463039
5 -->
6 <head>
7 <title>Test for Bug 463039</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="geolocation_common.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=463039">Mozilla Bug 463039</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 <script class="testbody" type="text/javascript">
21 SimpleTest.waitForExplicitFinish();
23 resume_geolocationProvider(function() {
24 force_prompt(true, test1);
25 });
27 function test1() {
28 navigator.geolocation.watchPosition(function(){});
30 // there are no watches, so this should always throw
31 for (x=-10; x<10; x++) {
32 navigator.geolocation.clearWatch(x);
33 ok(1, "clearWatch should not throw");
34 }
36 // lets try something huge
37 navigator.geolocation.clearWatch(Number.MAX_VALUE);
38 ok(1, "clearWatch should not throw");
40 SimpleTest.finish();
41 }
43 </script>
44 </pre>
45 </body>
46 </html>