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

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

Issue 1424233005: Fix another corner-case behavior of Object::SetSuperProperty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove should_throw argument of SetDataProperty. Created 5 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
« no previous file with comments | « test/mjsunit/es6/super.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/reflect.js
diff --git a/test/mjsunit/harmony/reflect.js b/test/mjsunit/harmony/reflect.js
index 439c38f0b5c122325aa33b0cbdf2db729f961a76..a3d44b891656d94ee55ea5c334ec2c782c0ab72b 100644
--- a/test/mjsunit/harmony/reflect.js
+++ b/test/mjsunit/harmony/reflect.js
@@ -244,8 +244,7 @@ function prepare(target) {
assertFalse("nowrite" in receiver);
// Data vs Non-Writable
- // TODO(neis): This must return false but currently doesn't.
- // assertFalse(Reflect.set({}, "nowrite", value, target));
+ assertFalse(Reflect.set({}, "nowrite", value, target));
// Data vs Accessor
assertFalse(Reflect.set({}, "unknown", 0, {set unknown(x) {}}));
@@ -264,6 +263,14 @@ function prepare(target) {
// Accessor vs Non-Object
assertTrue(Reflect.set(target, "setter2", value, null));
assertFalse(Reflect.set(target, "getter", value, null));
+
+ let receiver2 = {};
+ Object.defineProperty(receiver2, "bla",
+ {configurable: false, writable: true, value: true});
+ Object.defineProperty(receiver2, "not_in_target",
+ {configurable: false, writable: true, value: true});
+ assertTrue(Reflect.set(target, "bla", value, receiver2));
+ assertTrue(Reflect.set(target, "not_in_target", value, receiver2));
}
})();
« no previous file with comments | « test/mjsunit/es6/super.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698