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 function test() {
2 waitForExplicitFinish();
4 var win = openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no");
6 win.addEventListener("load", function () {
7 win.removeEventListener("load", arguments.callee, false);
9 win.content.addEventListener("focus", function () {
10 win.content.removeEventListener("focus", arguments.callee, false);
12 function onTabClose() {
13 ok(false, "shouldn't have gotten the TabClose event for the last tab");
14 }
15 var tab = win.gBrowser.selectedTab;
16 tab.addEventListener("TabClose", onTabClose, false);
18 EventUtils.synthesizeKey("w", { accelKey: true }, win);
20 ok(win.closed, "accel+w closed the window immediately");
22 tab.removeEventListener("TabClose", onTabClose, false);
24 finish();
25 }, false);
26 }, false);
27 }