Chromium Code Reviews| Index: test/mjsunit/es6/typedarray-tostring.js |
| diff --git a/test/mjsunit/es6/typedarray-tostring.js b/test/mjsunit/es6/typedarray-tostring.js |
| index 9d49cb1cc9a76b23c0e638f69bf71c42fa4e6e43..b3a2c68428ca02ce26a4dae8dc7760bba3622c7d 100644 |
| --- a/test/mjsunit/es6/typedarray-tostring.js |
| +++ b/test/mjsunit/es6/typedarray-tostring.js |
| @@ -5,6 +5,8 @@ |
| // Array's toString should call the object's own join method, if one exists and |
| // is callable. Otherwise, just use the original Object.toString function. |
| +// Flags: --allow-natives-syntax |
| + |
| var typedArrayConstructors = [ |
| Uint8Array, |
| Int8Array, |
| @@ -96,4 +98,10 @@ for (var constructor of typedArrayConstructors) { |
| Number.prototype.toLocaleString = NumberToLocaleString; |
| })(); |
| + |
| + // Detached Operation |
| + var array = new constructor([1, 2, 3]); |
| + %ArrayBufferNeuter(array.buffer); |
| + assertThrows(() => array.join(), TypeError); |
| + assertThrows(() => array.toLocalString(), TypeError); |
|
Camillo Bruni
2017/04/03 08:18:14
Please add the toString case as well (or a TODO if
Choongwoo Han
2017/04/03 08:42:29
Done.
|
| } |