Backed out 9 changesets (bug 1901851, bug 1728331) for causing remote worker crashes...
[gecko.git] / js / src / tests / test262 / built-ins / String / prototype / concat / S15.5.4.6_A9.js
blob16a29b87aeb4a73cc7c07000def62a867a150ff7
1 // Copyright 2009 the Sputnik authors.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 info: |
6     The String.prototype.concat.length property does not have the attribute
7     DontDelete
8 es5id: 15.5.4.6_A9
9 description: >
10     Checking if deleting the String.prototype.concat.length property
11     fails
12 ---*/
14 //////////////////////////////////////////////////////////////////////////////
15 //CHECK#0
16 if (!(String.prototype.concat.hasOwnProperty('length'))) {
17   throw new Test262Error('#0: String.prototype.concat.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.concat.hasOwnProperty('length'));
20 //////////////////////////////////////////////////////////////////////////////
22 //////////////////////////////////////////////////////////////////////////////
23 //CHECK#1
24 if (!delete String.prototype.concat.length) {
25   throw new Test262Error('#1: delete String.prototype.concat.length return true');
28 //////////////////////////////////////////////////////////////////////////////
30 //////////////////////////////////////////////////////////////////////////////
31 //CHECK#2
32 if (String.prototype.concat.hasOwnProperty('length')) {
33   throw new Test262Error('#2: delete String.prototype.concat.length; String.prototype.concat.hasOwnProperty(\'length\') return false. Actual: ' + String.prototype.concat.hasOwnProperty('length'));
36 //////////////////////////////////////////////////////////////////////////////
38 reportCompare(0, 0);