Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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();