1f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// Copyright 2013 the V8 project authors. All rights reserved. 2f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// Redistribution and use in source and binary forms, with or without 3f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// modification, are permitted provided that the following conditions are 4f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// met: 5f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// 6f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// * Redistributions of source code must retain the above copyright 7f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// notice, this list of conditions and the following disclaimer. 8f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// * Redistributions in binary form must reproduce the above 9f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// copyright notice, this list of conditions and the following 10f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// disclaimer in the documentation and/or other materials provided 11f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// with the distribution. 12f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// * Neither the name of Google Inc. nor the names of its 13f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// contributors may be used to endorse or promote products derived 14f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// from this software without specific prior written permission. 15f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// 16f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 21f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 26f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 28f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// Test that resolvedOptions is a method, not a property getter and that 29dfd8b8327b93660601d016cdc6f29f433b45a8d8Alexander Gutkin// the result is mutable. 30f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 31f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsonvar nf = new Intl.NumberFormat(); 32f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 33f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsonvar result = nf.resolvedOptions(); 34f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 35f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonassertTrue(result instanceof Object); 36f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 37f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson// Result should be mutable. 38f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodsonresult.locale = 'xx'; 39f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian Hodson 40f4c12fce1ee58e670f9c3fce46c40296ba9ee8a2Ian HodsonassertEquals(result.locale, 'xx'); 41dfd8b8327b93660601d016cdc6f29f433b45a8d8Alexander Gutkin