Debian Codegraph @

js/src/tests/test262/built-ins/decodeURIComponent/S15.1.3.2_A5.5.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 decodeURIComponent property has the attribute DontEnum
6 esid: sec-decodeuricomponent-encodeduricomponent
7 description: Checking use propertyIsEnumerable, for-in
8 ---*/
9
10 //CHECK#1
11 if (this.propertyIsEnumerable('decodeURIComponent') !== false) {
12 throw new Test262Error('#1: this.propertyIsEnumerable(\'decodeURIComponent\') === false. Actual: ' + (this.propertyIsEnumerable('decodeURIComponent')));
13 }
14
15 //CHECK#2
16 var result = true;
17 for (var p in this) {
18 if (p === "decodeURIComponent") {
19 result = false;
20 }
21 }
22
23 if (result !== true) {
24 throw new Test262Error('#2: result = true; for (p in this) { if (p === "decodeURIComponent") result = false; } result === true;');
25 }
26
27 reportCompare(0, 0);