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 const Cc = Components.classes;
2 const Ci = Components.interfaces;
4 function run_test() {
5 var notifications = 0;
6 var obs = {
7 observe: function(aSubject, aTopic, aData) {
8 do_check_eq(aTopic, "last-pb-context-exited");
9 notifications++;
10 }
11 };
12 var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
13 os.addObserver(obs, "last-pb-context-exited", false);
15 run_test_in_child("../unit/test_pb_notification.js",
16 function() {
17 do_check_eq(notifications, 1);
18 do_test_finished();
19 });
20 }