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

Side by Side Diff: test/mjsunit/es6/built-in-accessor-names.js

Issue 1106713002: Revert of [es6] Map/Set size getter should have "get size" name (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/es6/collections.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 'use strict';
6
7 function assertGetterName(expected, object, name) {
8 var descr = Object.getOwnPropertyDescriptor(object, name);
9 assertSame(expected, descr.get.name);
10 }
11
12
13 function assertSetterName(expected, object, name) {
14 var descr = Object.getOwnPropertyDescriptor(object, name);
15 assertSame(expected, descr.set.name);
16 }
17
18
19 assertGetterName('get byteLength', ArrayBuffer.prototype, 'byteLength');
20 assertGetterName('get size', Set.prototype, 'size');
21 assertGetterName('get size', Map.prototype, 'size');
22
23
24 let typedArrays = [
25 Uint8Array,
26 Int8Array,
27 Uint16Array,
28 Int16Array,
29 Uint32Array,
30 Int32Array,
31 Float32Array,
32 Float64Array,
33 Uint8ClampedArray
34 ];
35
36 for (let f of typedArrays) {
37 assertGetterName('get buffer', f.prototype, 'buffer');
38 assertGetterName('get byteOffset', f.prototype, 'byteOffset');
39 assertGetterName('get byteLength', f.prototype, 'byteLength');
40 assertGetterName('get length', f.prototype, 'length');
41 assertGetterName('get [Symbol.toStringTag]', f.prototype, Symbol.toStringTag);
42 }
43
44
45 assertGetterName('get buffer', DataView.prototype, 'buffer');
46 assertGetterName('get byteOffset', DataView.prototype, 'byteOffset');
47 assertGetterName('get byteLength', DataView.prototype, 'byteLength');
48
49
50 assertGetterName('get __proto__', Object.prototype, '__proto__');
51 assertSetterName('set __proto__', Object.prototype, '__proto__');
OLDNEW
« no previous file with comments | « src/v8natives.js ('k') | test/mjsunit/es6/collections.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698