blob: 7f67747f2919e51e694febb164a57a072fd26b41 [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// Copyright 2015 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 throwTypeErrorFunction =
6 Object.getOwnPropertyDescriptor(Function.prototype, 'arguments').get;
7
8assertFalse(
9 Object.prototype.hasOwnProperty.call(throwTypeErrorFunction, 'name'));
10assertThrows(function() {
11 'use strict';
12 throwTypeErrorFunction.name = 'foo';
13}, TypeError);
14
15var lengthDesc =
16 Object.getOwnPropertyDescriptor(throwTypeErrorFunction, 'length');
17assertFalse(lengthDesc.configurable, 'configurable');
18assertFalse(lengthDesc.enumerable, 'enumerable');
19assertFalse(lengthDesc.writable, 'writable');
20assertThrows(function() {
21 'use strict';
22 throwTypeErrorFunction.length = 42;
23}, TypeError);
24
25assertTrue(Object.isFrozen(throwTypeErrorFunction));