Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/decodeURIComponent/S15.1.3.2_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: |
6 The length property of decodeURIComponent does not have the attribute
7 DontDelete
8 es5id: 15.1.3.2_A5.2
9 es6id: 18.2.6.3
10 esid: sec-decodeuricomponent-encodeduricomponent
11 description: Checking use hasOwnProperty, delete
12 ---*/
13
14 //CHECK#1
15 if (decodeURIComponent.hasOwnProperty('length') !== true) {
16 $ERROR('#1: decodeURIComponent.hasOwnProperty(\'length\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));
17 }
18
19 delete decodeURIComponent.length;
20
21 //CHECK#2
22 if (decodeURIComponent.hasOwnProperty('length') !== false) {
23 $ERROR('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\'length\') === false. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));
24 }
25
26 //CHECK#3
27 if (decodeURIComponent.length === undefined) {
28 $ERROR('#3: delete decodeURIComponent.length; decodeURIComponent.length !== undefined');
29 }