Debian Codegraph @

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