blob: dbaa2454daf3a6dcb71bd578e3c67226c81abc32 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// Copyright 2014 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5var o = { __proto__:Array.prototype, 0:"x" };
6function boomer() { return 0; }
7Object.defineProperty(o, "length", { get:boomer, set:boomer });
8Object.seal(o);
9
10assertDoesNotThrow(function() { o.push(1); });
11assertEquals(0, o.length);
12assertEquals(1, o[0]);
13
14assertDoesNotThrow(function() { o.unshift(2); });
15assertEquals(0, o.length);
16assertEquals(2, o[0]);