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