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.
2 (function () {
3 assertEquals = function assertEquals(expected, found, name_opt) { };
4 })();
5 function testOne(receiver, key, result) {
6 for(var i = 0; i != 10; i++ ) {
7 assertEquals(result, receiver[key]());
8 }
9 }
10 function TypeOfThis() { return typeof this; }
11 Number.prototype.type = TypeOfThis;
12 String.prototype.type = TypeOfThis;
13 Boolean.prototype.type = TypeOfThis;
14 testOne(2.3, 'type', 'object');
15 testOne('x', 'type', 'object');
16 testOne(true, 'type', 'object');