Imported Upstream version 1.0.0
[platform/upstream/js.git] / js / src / jit-test / tests / basic / new-Function-prototype.js
1 var funProto = Function.prototype;
2 assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
3
4 assertEq(parseInt.prototype, undefined);
5
6 var oldObj;
7 for (var i = 0, sz = RUNLOOP; i < sz; oldObj = obj, i++)
8 {
9   var obj = new funProto;
10   assertEq(obj === oldObj, false);
11   assertEq(Object.prototype.toString.call(obj), "[object Object]");
12   assertEq(Object.getOwnPropertyDescriptor(funProto, "prototype"), undefined);
13   assertEq(Object.getOwnPropertyDescriptor(parseInt, "prototype"), undefined);
14   assertEq(parseInt.prototype, undefined);
15 }
16
17 checkStats({
18   recorderStarted: 1,
19   recorderAborted: 0,
20   traceTriggered: 1,
21   traceCompleted: 1,
22 });