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 // Test for the shell's FakeDOMObject constructor. This test
2 // ensures the fuzzers know about this object.
3 function f() {
4 var res = 0;
5 var d = new FakeDOMObject();
6 assertEq(d !== new FakeDOMObject(), true);
8 for (var i=0; i<100; i++) {
9 var x = d.x;
10 assertEq(typeof x, "number");
12 d.x = 10;
13 d.x = undefined;
15 d.x = FakeDOMObject.prototype.x;
16 FakeDOMObject.prototype.x = d.x;
17 FakeDOMObject.prototype.doFoo();
19 assertEq(d.doFoo(), 0);
20 assertEq(d.doFoo(1), 1);
21 assertEq(d.doFoo(1, 2), 2);
22 }
23 }
24 f();