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 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
4 <!--
5 Test for Geolocation in chrome
6 -->
7 <window id="sample-window" width="400" height="400"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script type="application/javascript"
10 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
12 <script>
13 SimpleTest.waitForExplicitFinish();
15 const Ci = Components.interfaces;
16 const Cc = Components.classes;
18 var geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
19 geolocation.getCurrentPosition(done, error);
21 function error(error)
22 {
23 ok(0, "error occured trying to get geolocation from chrome");
24 SimpleTest.finish();
25 }
26 function done(position)
27 {
28 ok(position, "geolocation was found from chrome");
29 SimpleTest.finish();
30 }
31 </script>
33 <body xmlns="http://www.w3.org/1999/xhtml" style="height: 300px; overflow: auto;"/>
35 </window>