OLD | NEW |
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-tostring |
| 6 |
5 'use strict'; | 7 'use strict'; |
6 | 8 |
7 function assertGetterName(expected, object, name) { | 9 function assertGetterName(expected, object, name) { |
8 var descr = Object.getOwnPropertyDescriptor(object, name); | 10 var descr = Object.getOwnPropertyDescriptor(object, name); |
9 assertSame(expected, descr.get.name); | 11 assertSame(expected, descr.get.name); |
10 } | 12 } |
11 | 13 |
12 | 14 |
13 function assertSetterName(expected, object, name) { | 15 function assertSetterName(expected, object, name) { |
14 var descr = Object.getOwnPropertyDescriptor(object, name); | 16 var descr = Object.getOwnPropertyDescriptor(object, name); |
(...skipping 27 matching lines...) Expand all Loading... |
42 } | 44 } |
43 | 45 |
44 | 46 |
45 assertGetterName('get buffer', DataView.prototype, 'buffer'); | 47 assertGetterName('get buffer', DataView.prototype, 'buffer'); |
46 assertGetterName('get byteOffset', DataView.prototype, 'byteOffset'); | 48 assertGetterName('get byteOffset', DataView.prototype, 'byteOffset'); |
47 assertGetterName('get byteLength', DataView.prototype, 'byteLength'); | 49 assertGetterName('get byteLength', DataView.prototype, 'byteLength'); |
48 | 50 |
49 | 51 |
50 assertGetterName('get __proto__', Object.prototype, '__proto__'); | 52 assertGetterName('get __proto__', Object.prototype, '__proto__'); |
51 assertSetterName('set __proto__', Object.prototype, '__proto__'); | 53 assertSetterName('set __proto__', Object.prototype, '__proto__'); |
OLD | NEW |