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

Side by Side Diff: test/mjsunit/es6/array-species.js

Issue 2096933002: Remove all harmony runtime flags which shipped in M51 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Review comments Created 4 years, 6 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 unified diff | Download patch
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-species
6
7 // Test the ES2015 @@species feature 5 // Test the ES2015 @@species feature
8 6
9 'use strict'; 7 'use strict';
10 8
11 // Subclasses of Array construct themselves under map, etc 9 // Subclasses of Array construct themselves under map, etc
12 10
13 class MyArray extends Array { } 11 class MyArray extends Array { }
14 12
15 assertEquals(MyArray, new MyArray().map(()=>{}).constructor); 13 assertEquals(MyArray, new MyArray().map(()=>{}).constructor);
16 assertEquals(MyArray, new MyArray().filter(()=>{}).constructor); 14 assertEquals(MyArray, new MyArray().filter(()=>{}).constructor);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 assertArrayEquals([0], params); 162 assertArrayEquals([0], params);
165 163
166 // @@species constructor can be a Proxy, and the realm access doesn't 164 // @@species constructor can be a Proxy, and the realm access doesn't
167 // crash 165 // crash
168 166
169 class MyProxyArray extends Array { } 167 class MyProxyArray extends Array { }
170 let ProxyArray = new Proxy(MyProxyArray, {}); 168 let ProxyArray = new Proxy(MyProxyArray, {});
171 MyProxyArray.constructor = ProxyArray; 169 MyProxyArray.constructor = ProxyArray;
172 170
173 assertEquals(MyProxyArray, new ProxyArray().map(()=>{}).constructor); 171 assertEquals(MyProxyArray, new ProxyArray().map(()=>{}).constructor);
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/optimized-instanceof-2.js ('k') | test/mjsunit/es6/array-species-constructor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698