Lines Matching defs:apply

25 "This tests that we can correctly call Function.prototype.apply"
28 var myObject = { apply: function() { return [myObject, "myObject.apply"] } };
38 return f.apply(thisValue, arguments);
40 return g.apply(null, args);
43 recurseArguments.apply(null, arguments);
46 myFunctionWithApply.apply = function (arg1) { return [this, "myFunctionWithApply.apply", arg1] };
47 Function.prototype.aliasedApply = Function.prototype.apply;
50 shouldBe("myObject.apply()", '[myObject, "myObject.apply"]');
51 shouldBe("forwarder(myObject)", '[myObject, "myObject.apply"]');
54 shouldBe("myFunction.apply(myObject, ['arg1'])", '[myObject, "myFunction", "arg1"]');
55 shouldBe("myFunction.apply(myObject, arg1Array)", '[myObject, "myFunction", "arg1"]');
57 shouldBe("myFunction.apply()", '[this, "myFunction", undefined]');
58 shouldBe("myFunction.apply(null)", '[this, "myFunction", undefined]');
59 shouldBe("myFunction.apply(undefined)", '[this, "myFunction", undefined]');
64 shouldBe("myFunctionWithApply.apply(myObject, ['arg1'])", '[myFunctionWithApply, "myFunctionWithApply.apply", myObject]');
66 shouldBe("myFunctionWithApply.apply(myObject, arg1Array)", '[myFunctionWithApply, "myFunctionWithApply.apply", myObject]');
67 shouldBe("forwarder(myFunctionWithApply, myObject, arg1Array)", '[myFunctionWithApply, "myFunctionWithApply.apply", myObject]');
76 shouldThrow("myFunction.apply(null, new Array(5000000))");
78 shouldThrow("myFunction.apply(null, new Array(1 << 30))");
84 shouldThrow("recurseArguments.apply(null, new Array(50000))");