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

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

Issue 2397603003: [runtime] Let native setters have a return value. (Closed)
Patch Set: Ouch. Created 4 years, 2 months 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
« no previous file with comments | « test/cctest/heap/test-alloc.cc ('k') | test/mjsunit/modules-namespace1.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/reflect.js
diff --git a/test/mjsunit/es6/reflect.js b/test/mjsunit/es6/reflect.js
index d597a78901ad35a081d167a87c651cad01f86c0c..9e21717a994a0a38f65ded7d85a750e64473fc78 100644
--- a/test/mjsunit/es6/reflect.js
+++ b/test/mjsunit/es6/reflect.js
@@ -273,6 +273,14 @@ function prepare(target) {
})();
+(function testReflectSetArrayLength() {
+ var y = [];
+ Object.defineProperty(y, 0, {value: 42, configurable: false});
+ assertFalse(Reflect.set(y, 'length', 0));
+ assertTrue(Reflect.set(y, 'length', 2));
+})();
+
+
////////////////////////////////////////////////////////////////////////////////
// Reflect.has
@@ -352,6 +360,14 @@ function prepare(target) {
})();
+(function testReflectDefinePropertyArrayLength() {
+ var y = [];
+ Object.defineProperty(y, 0, {value: 42, configurable: false});
+ assertFalse(Reflect.defineProperty(y, 'length', {value: 0}));
+ assertTrue(Reflect.defineProperty(y, 'length', {value: 2}));
+})();
+
+
// See reflect-define-property.js for further tests.
« no previous file with comments | « test/cctest/heap/test-alloc.cc ('k') | test/mjsunit/modules-namespace1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698