test262/test/suite/ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js
2011-10-03 13:04:52 -07:00

31 lines
952 B
JavaScript

// 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 decodeURIComponent has the attribute DontDelete
*
* @path ch15/15.1/15.1.3/15.1.3.2/S15.1.3.2_A5.2.js
* @description Checking use hasOwnProperty, delete
*/
//CHECK#1
if (decodeURIComponent.hasOwnProperty('length') !== true) {
$FAIL('#1: decodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));
}
delete decodeURIComponent.length;
//CHECK#2
if (decodeURIComponent.hasOwnProperty('length') !== true) {
$ERROR('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));
}
//CHECK#3
if (decodeURIComponent.length === undefined) {
$ERROR('#3: delete decodeURIComponent.length; decodeURIComponent.length !== undefined');
}