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

Side by Side Diff: test/mjsunit/harmony/reflect.js

Issue 1427113002: Fix corner-case behavior of Object::SetSuperProperty. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « test/mjsunit/es6/super.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --harmony-reflect 5 // Flags: --harmony-reflect
6 6
7 // TODO(neis): Test with proxies. 7 // TODO(neis): Test with proxies.
8 8
9 9
10 10
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 assertFalse(Reflect.set(target, "nowrite", value, receiver)); 242 assertFalse(Reflect.set(target, "nowrite", value, receiver));
243 assertEquals(44, target.nowrite); 243 assertEquals(44, target.nowrite);
244 assertFalse("nowrite" in receiver); 244 assertFalse("nowrite" in receiver);
245 245
246 // Data vs Non-Writable 246 // Data vs Non-Writable
247 // TODO(neis): This must return false but currently doesn't. 247 // TODO(neis): This must return false but currently doesn't.
248 // assertFalse(Reflect.set({}, "nowrite", value, target)); 248 // assertFalse(Reflect.set({}, "nowrite", value, target));
249 249
250 // Data vs Accessor 250 // Data vs Accessor
251 // TODO(neis): These must return false but currently don't. 251 assertFalse(Reflect.set({}, "unknown", 0, {set unknown(x) {}}));
252 // assertFalse(Reflect.set(target, "unknown", value, {set bla(x) {}})); 252 assertFalse(Reflect.set(target, "unknown", value, {set unknown(x) {}}));
253 // assertFalse(Reflect.set(target, "unknown", value, {get bla() {}})); 253 assertFalse(Reflect.set(target, "bla", value, {set bla(x) {}}));
254 // assertFalse(Reflect.set(target, "bla", value, {set bla(x) {}})); 254 assertFalse(Reflect.set(target, "bla", value, {get bla() {}}));
255 // assertFalse(Reflect.set(target, "bla", value, {get bla() {}}));
256 255
257 // Accessor vs Data 256 // Accessor vs Data
258 assertTrue(Reflect.set({set bla(x) {}}), "bla", value, target); 257 assertTrue(Reflect.set({set bla(x) {}}), "bla", value, target);
259 assertFalse(Reflect.set({get bla() {}}, "bla", value, target)); 258 assertFalse(Reflect.set({get bla() {}}, "bla", value, target));
260 259
261 // Data vs Non-Object 260 // Data vs Non-Object
262 assertFalse(Reflect.set({}, "bla", value, null)); 261 assertFalse(Reflect.set({}, "bla", value, null));
263 assertFalse(Reflect.set({bla: 42}, "bla", value, null)); 262 assertFalse(Reflect.set({bla: 42}, "bla", value, null));
264 263
265 // Accessor vs Non-Object 264 // Accessor vs Non-Object
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 assertThrows(function() { Reflect.preventExtensions(); }, TypeError); 545 assertThrows(function() { Reflect.preventExtensions(); }, TypeError);
547 assertThrows(function() { Reflect.preventExtensions(42); }, TypeError); 546 assertThrows(function() { Reflect.preventExtensions(42); }, TypeError);
548 assertThrows(function() { Reflect.preventExtensions(null); }, TypeError); 547 assertThrows(function() { Reflect.preventExtensions(null); }, TypeError);
549 })(); 548 })();
550 549
551 550
552 // See reflect-prevent-extensions.js for further tests. 551 // See reflect-prevent-extensions.js for further tests.
553 552
554 // TODO(neis): Need proxies to test the situation where 553 // TODO(neis): Need proxies to test the situation where
555 // [[preventExtensions]] returns false. 554 // [[preventExtensions]] returns false.
OLDNEW
« 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