Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1466)

Unified Diff: test/mjsunit/es6/classes.js

Issue 2430383004: Remove the 'caller' property from the strict-mode arguments map (Closed)
Patch Set: fix restored test and other Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/es6/classes.js
diff --git a/test/mjsunit/es6/classes.js b/test/mjsunit/es6/classes.js
index fb77dbb8e4b01bb273512b215763dadbb1077661..64cdb59574d98bc9fa5bc3c013e34ff79d7ac14b 100644
--- a/test/mjsunit/es6/classes.js
+++ b/test/mjsunit/es6/classes.js
@@ -164,14 +164,21 @@
SyntaxError);
var D = class extends function() {
- arguments.caller;
adamk 2016/10/31 18:05:36 Seems reasonable to change this to test arguments.
+ this.arguments = arguments;
} {};
assertThrows(function() {
Object.getPrototypeOf(D).arguments;
}, TypeError);
- assertThrows(function() {
- new D;
- }, TypeError);
+ var e = new D();
+ assertEquals(undefined, Object.getOwnPropertyDescriptor(e.arguments, "caller"));
adamk 2016/10/31 18:05:36 Nit: wrap to 80 columns.
+ assertEquals(undefined, e.arguments.caller);
+ assertEquals(true, Reflect.set(e.arguments, "caller", 0));
adamk 2016/10/31 18:05:36 I don't understand the need for this test. You're
caitp 2016/10/31 18:07:49 I suggested adding this, because property access i
caitp 2016/10/31 18:10:33 specifically, this also checks that the property i
adamk 2016/10/31 18:29:15 I just don't think it makes sense to test property
+ assertEquals(Object.getOwnPropertyDescriptor(e.arguments, "caller"), {
+ value: 0,
+ configurable: true,
+ enumerable: true,
+ writable: true
+ });
})();

Powered by Google App Engine
This is Rietveld 408576698