summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Date/prototype/S15.9.4.1_A1_T2.js
blob: 8696fba7d68fef63b6877607ab576a70a4e15b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: |
    The Date property "prototype" has { DontEnum, DontDelete, ReadOnly }
    attributes
esid: sec-date.prototype
description: Checking DontDelete attribute
includes: [propertyHelper.js]
---*/

verifyNotConfigurable(Date, "prototype");

try {
  assert.sameValue(delete Date.prototype, false);
} catch (e) {
  if (e instanceof Test262Error) {
    throw e;
  }
  assert(e instanceof TypeError);
}

if (!Date.hasOwnProperty('prototype')) {
  throw new Test262Error('#2: The Date.prototype property has the attributes DontDelete');
}

// TODO: Convert to verifyProperty() format.

reportCompare(0, 0);