Chromium Code Reviews| Index: test/mjsunit/element-accessor.js |
| diff --git a/test/mjsunit/element-accessor.js b/test/mjsunit/element-accessor.js |
| index 5fba359c2a769cd5b46598bacc385c519ffa7762..7c22f146d4dbcafb31e6cd4c8eea77727afae9c6 100644 |
| --- a/test/mjsunit/element-accessor.js |
| +++ b/test/mjsunit/element-accessor.js |
| @@ -29,9 +29,16 @@ |
| })(); |
| (function () { |
| - var o = new Int32Array(); |
| - Object.defineProperty(o, "0", {get: function(){}}); |
| - assertEquals(undefined, Object.getOwnPropertyDescriptor(o, "0")); |
| + var o = new Int32Array(1); |
| + assertThrows(function() { |
| + Object.defineProperty(o, '0', {get: function() {}}) |
| + }, TypeError); |
|
caitp
2016/11/21 22:02:36
nit: you can use arrow function to make this more
Henrique Ferreiro
2016/11/21 22:38:11
Done.
|
| + assertEquals({ |
| + value: 0, |
| + writable: true, |
| + enumerable: true, |
| + configurable: false |
| + }, Object.getOwnPropertyDescriptor(o, "0")); |
| })(); |
| (function() { |