S15.1.3.2_A5.2.js (1038B)
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: | 6 The length property of decodeURIComponent does not have the attribute 7 DontDelete 8 esid: sec-decodeuricomponent-encodeduricomponent 9 description: Checking use hasOwnProperty, delete 10 ---*/ 11 12 //CHECK#1 13 if (decodeURIComponent.hasOwnProperty('length') !== true) { 14 throw new Test262Error('#1: decodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length'))); 15 } 16 17 delete decodeURIComponent.length; 18 19 //CHECK#2 20 if (decodeURIComponent.hasOwnProperty('length') !== false) { 21 throw new Test262Error('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (decodeURIComponent.hasOwnProperty('length'))); 22 } 23 24 //CHECK#3 25 if (decodeURIComponent.length === undefined) { 26 throw new Test262Error('#3: delete decodeURIComponent.length; decodeURIComponent.length !== undefined'); 27 } 28 29 reportCompare(0, 0);