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=494924
5 -->
6 <head>
7 <title>Test for getCurrentPosition </title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="text/javascript" src="geolocation_common.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=494924">Mozilla Bug 494924</a>
15 <p id="display"></p>
16 <div id="content" style="display: none">
18 </div>
19 <pre id="test">
20 <script class="testbody" type="text/javascript">
22 SimpleTest.waitForExplicitFinish();
24 resume_geolocationProvider(function() {
25 force_prompt(true, test1);
26 });
28 function successCallback2(position) {
29 check_geolocation(position);
30 SimpleTest.finish();
31 }
33 function successCallback1(position) {
34 check_geolocation(position);
35 worse_geolocationProvider(function() {
36 navigator.geolocation.getCurrentPosition(successCallback2, null, { maximumAge: 0 });
37 });
38 }
40 function test1() {
41 navigator.geolocation.getCurrentPosition(successCallback1, null, { maximumAge: 0 });
42 }
43 </script>
44 </pre>
45 </body>
46 </html>