| 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 | 5 |
| 6 var funcs = [ | 6 var funcs = [ |
| 7 | 7 |
| 8 // https://code.google.com/p/v8/issues/detail?id=4002 | 8 // https://code.google.com/p/v8/issues/detail?id=4002 |
| 9 // Error, | 9 // Error, |
| 10 // EvalError, | 10 // EvalError, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 Uint16Array, | 41 Uint16Array, |
| 42 Uint32Array, | 42 Uint32Array, |
| 43 Uint8Array, | 43 Uint8Array, |
| 44 Uint8ClampedArray, | 44 Uint8ClampedArray, |
| 45 WeakMap, | 45 WeakMap, |
| 46 WeakSet, | 46 WeakSet, |
| 47 ]; | 47 ]; |
| 48 | 48 |
| 49 for (var fun of funcs) { | 49 for (var fun of funcs) { |
| 50 var p = fun.prototype; | 50 var p = fun.prototype; |
| 51 |
| 52 // @@toStringTag is tested separately, and interferes with this test. |
| 53 if (Symbol.toStringTag) delete p[Symbol.toStringTag]; |
| 51 assertEquals('[object Object]', Object.prototype.toString.call(p)); | 54 assertEquals('[object Object]', Object.prototype.toString.call(p)); |
| 52 } | 55 } |
| 53 | 56 |
| 54 | 57 |
| 55 // These still have special prototypes for legacy reason. | 58 // These still have special prototypes for legacy reason. |
| 56 var funcs = [ | 59 var funcs = [ |
| 57 Array, | 60 Array, |
| 58 Function, | 61 Function, |
| 59 ]; | 62 ]; |
| 60 | 63 |
| 61 for (var fun of funcs) { | 64 for (var fun of funcs) { |
| 62 var p = fun.prototype; | 65 var p = fun.prototype; |
| 63 assertEquals('[object ' + fun.name + ']', Object.prototype.toString.call(p)); | 66 assertEquals(`[object ${fun.name}]`, Object.prototype.toString.call(p)); |
| 64 } | 67 } |
| OLD | NEW |