tests/auto/qml/ecmascripttests/test262/test/built-ins/Date/parse/S15.9.4.2_A1_T1.js
raw| 1 | // Copyright 2009 the Sputnik authors. All rights reserved. |
| 2 | // This code is governed by the BSD license found in the LICENSE file. |
| 3 | |
| 4 | /*--- |
| 5 | info: The Date property "parse" has { DontEnum } attributes |
| 6 | esid: sec-date.parse |
| 7 | es5id: 15.9.4.2_A1_T1 |
| 8 | description: Checking absence of ReadOnly attribute |
| 9 | ---*/ |
| 10 | |
| 11 | var x = Date.parse; |
| 12 | if (x === 1) |
| 13 | Date.parse = 2; |
| 14 | else |
| 15 | Date.parse = 1; |
| 16 | if (Date.parse === x) { |
| 17 | $ERROR('#1: The Date.parse has not the attribute ReadOnly'); |
| 18 | } |