OLD | NEW |
| (Empty) |
1 This tests that we can correctly call Function.prototype.apply | |
2 | |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 PASS myObject.apply() is [myObject, "myObject.apply"] | |
7 PASS forwarder(myObject) is [myObject, "myObject.apply"] | |
8 PASS myFunction('arg1') is [this, "myFunction", "arg1"] | |
9 PASS forwarder(myFunction, null, ['arg1']) is [this, "myFunction", "arg1"] | |
10 PASS myFunction.apply(myObject, ['arg1']) is [myObject, "myFunction", "arg1"] | |
11 PASS myFunction.apply(myObject, arg1Array) is [myObject, "myFunction", "arg1"] | |
12 PASS forwarder(myFunction, myObject, arg1Array) is [myObject, "myFunction", "arg
1"] | |
13 PASS myFunction.apply() is [this, "myFunction", undefined] | |
14 PASS myFunction.apply(null) is [this, "myFunction", undefined] | |
15 PASS myFunction.apply(undefined) is [this, "myFunction", undefined] | |
16 PASS myFunction.aliasedApply(myObject, ['arg1']) is [myObject, "myFunction", "ar
g1"] | |
17 PASS myFunction.aliasedApply() is [this, "myFunction", undefined] | |
18 PASS myFunction.aliasedApply(null) is [this, "myFunction", undefined] | |
19 PASS myFunction.aliasedApply(undefined) is [this, "myFunction", undefined] | |
20 PASS myFunctionWithApply.apply(myObject, ['arg1']) is [myFunctionWithApply, "myF
unctionWithApply.apply", myObject] | |
21 PASS myFunctionWithApply.aliasedApply(myObject, ['arg1']) is [myObject, "myFunct
ionWithApply", "arg1"] | |
22 PASS myFunctionWithApply.apply(myObject, arg1Array) is [myFunctionWithApply, "my
FunctionWithApply.apply", myObject] | |
23 PASS forwarder(myFunctionWithApply, myObject, arg1Array) is [myFunctionWithApply
, "myFunctionWithApply.apply", myObject] | |
24 PASS myFunctionWithApply.aliasedApply(myObject, arg1Array) is [myObject, "myFunc
tionWithApply", "arg1"] | |
25 PASS myFunction.apply(null, new Array(5000000)) threw exception RangeError: Maxi
mum call stack size exceeded.. | |
26 PASS myFunction.apply(null, new Array(1 << 30)) threw exception RangeError: Maxi
mum call stack size exceeded.. | |
27 PASS recurseArguments.apply(null, new Array(50000)) threw exception RangeError:
Maximum call stack size exceeded.. | |
28 PASS successfullyParsed is true | |
29 | |
30 TEST COMPLETE | |
31 | |
OLD | NEW |