Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/decodeURI/S15.1.3.1_A5.2.js

raw
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 es5id: 15.1.3.1_A5.2
7 es6id: 18.2.6.2
8 esid: sec-decodeuri-encodeduri
9 description: Checking use hasOwnProperty, delete
10 ---*/
11
12 //CHECK#1
13 if (decodeURI.hasOwnProperty('length') !== true) {
14 $ERROR('#1: decodeURI.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURI.hasOwnProperty('length')));
15 }
16
17 delete decodeURI.length;
18
19 //CHECK#2
20 if (decodeURI.hasOwnProperty('length') !== false) {
21 $ERROR('#2: delete decodeURI.length; decodeURI.hasOwnProperty(\'length\') === false. Actual: ' + (decodeURI.hasOwnProperty('length')));
22 }
23
24 //CHECK#3
25 if (decodeURI.length === undefined) {
26 $ERROR('#3: delete decodeURI.length; decodeURI.length !== undefined');
27 }