Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 function test1() {
2 function h(node) {
3 var x = 0.1;
4 for (var i=0; i<100; i++) {
5 x += node.parent;
6 }
7 return x;
8 }
9 function build(depth) {
10 if (depth > 10)
11 return {parent: 3.3};
12 return {__proto__: build(depth + 1)};
13 }
14 var tree = build(0);
15 assertEq(h(tree)|0, 330);
16 }
17 test1();
19 function test2() {
20 function Foo() {};
21 Foo.prototype.x = 3.3;
23 var o = new Foo();
24 for (var i=0; i<100; i++) {
25 assertEq(o.x, 3.3);
26 }
27 }
28 test2();