Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / String / prototype / toLocaleUpperCase / S15.5.4.19_A10.js
blob07ac6f90b76266fbd63a68220306a17d1f340d8d
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.toLocaleUpperCase.length property has the attribute
7     ReadOnly
8 es5id: 15.5.4.19_A10
9 description: >
10     Checking if varying the String.prototype.toLocaleUpperCase.length
11     property fails
12 includes: [propertyHelper.js]
13 ---*/
15 //////////////////////////////////////////////////////////////////////////////
16 //CHECK#1
17 if (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {
18   throw new Test262Error('#1: String.prototype.toLocaleUpperCase.hasOwnProperty(\'length\') return true. Actual: ' + String.prototype.toLocaleUpperCase.hasOwnProperty('length'));
21 //////////////////////////////////////////////////////////////////////////////
23 var __obj = String.prototype.toLocaleUpperCase.length;
25 verifyNotWritable(String.prototype.toLocaleUpperCase, "length", null, function() {
26   return "shifted";
27 });
29 //////////////////////////////////////////////////////////////////////////////
30 //CHECK#2
31 if (String.prototype.toLocaleUpperCase.length !== __obj) {
32   throw new Test262Error('#2: __obj = String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.length = function(){return "shifted";}; String.prototype.toLocaleUpperCase.length === __obj. Actual: ' + String.prototype.toLocaleUpperCase.length);
35 //////////////////////////////////////////////////////////////////////////////
37 reportCompare(0, 0);