Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
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"
4 type="text/css"?>
5 <!--
6 https://bugzilla.mozilla.org/show_bug.cgi?id=538242
7 -->
8 <window title="Mozilla Bug 538242"
9 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
11 <script type="application/javascript"
12 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js" />
14 <body xmlns="http://www.w3.org/1999/xhtml">
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 </pre>
20 </body>
22 <script class="testbody" type="application/javascript">
23 <![CDATA[
25 if (navigator.platform.startsWith("Win")) {
26 SimpleTest.expectAssertions(0, 1);
27 }
29 SimpleTest.waitForExplicitFinish();
31 SimpleTest.waitForFocus(function () {
32 if (navigator.platform.indexOf("Lin") != -1) {
33 ok(true, "This test is disabled on Linux because it expects moving windows to be synchronous which is not guaranteed on Linux.");
34 SimpleTest.finish();
35 return;
36 }
38 var win = window.open("window_bug538242.xul", "_blank",
39 "chrome=1,width=400,height=300,left=100,top=100");
40 SimpleTest.waitForFocus(function () {
41 is(win.screenX, 100, "window should open at 100, 100");
42 is(win.screenY, 100, "window should open at 100, 100");
43 var [oldX, oldY] = [win.screenX, win.screenY];
44 win.moveTo(0, 0);
45 isnot(win.screenX, oldX, "window should have moved to a point near 0, 0");
46 isnot(win.screenY, oldY, "window should have moved to a point near 0, 0");
47 win.close();
48 SimpleTest.finish();
49 }, win);
50 });
52 ]]>
53 </script>
55 </window>