summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js')
-rw-r--r--js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js b/js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js
new file mode 100644
index 0000000000..76b679e67c
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Function/prototype/bind/S15.3.4.5_A4.js
@@ -0,0 +1,19 @@
+// Copyright 2011 Google Inc. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 15.3.4.5_A4
+description: >
+ Function.prototype.bind call the original's internal [[Call]]
+ method rather than its .apply method.
+---*/
+
+function foo() {}
+
+var b = foo.bind(33, 44);
+foo.apply = function() {
+ throw new Test262Error("Function.prototype.bind called original's .apply method");
+};
+b(55, 66);
+
+reportCompare(0, 0);