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