blob: c50b4df4678f908911461b8fd3baae775cf40c9a (
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.
/**
* The length property of reverse has the attribute DontDelete
*
* @path ch15/15.4/15.4.4/15.4.4.8/S15.4.4.8_A5.2.js
* @description Checking use hasOwnProperty, delete
* @noStrict
*/
//CHECK#1
if (Array.prototype.reverse.hasOwnProperty('length') !== true) {
$FAIL('#1: Array.prototype.reverse.hasOwnProperty(\'length\') === true. Actual: ' + (Array.prototype.reverse.hasOwnProperty('length')));
}
delete Array.prototype.reverse.length;
//CHECK#2
if (Array.prototype.reverse.hasOwnProperty('length') !== true) {
$ERROR('#2: delete Array.prototype.reverse.length; Array.prototype.reverse.hasOwnProperty(\'length\') === true. Actual: ' + (Array.prototype.reverse.hasOwnProperty('length')));
}
//CHECK#3
if (Array.prototype.reverse.length === undefined) {
$ERROR('#3: delete Array.prototype.reverse.length; Array.prototype.reverse.length !== undefined');
}
|