summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js')
-rw-r--r--js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js22
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js b/js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js
new file mode 100644
index 0000000000..d8641fa809
--- /dev/null
+++ b/js/src/tests/test262/built-ins/Proxy/apply/return-abrupt.js
@@ -0,0 +1,22 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-proxy-object-internal-methods-and-internal-slots-call-thisargument-argumentslist
+description: >
+ Return is an abrupt completion
+features: [Proxy]
+---*/
+
+var p = new Proxy(function() {
+ throw 'not the Test262Error you are looking for';
+}, {
+ apply: function(t, c, args) {
+ throw new Test262Error();
+ }
+});
+
+assert.throws(Test262Error, function() {
+ p.call();
+});
+
+reportCompare(0, 0);