|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
3 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
5 |
|
6 |
|
7 /** |
|
8 File Name: 15.4.3.1-1.js |
|
9 ECMA Section: 15.4.3.1 Array.prototype |
|
10 Description: The initial value of Array.prototype is the built-in |
|
11 Array prototype object (15.4.4). |
|
12 |
|
13 Author: christine@netscape.com |
|
14 Date: 7 october 1997 |
|
15 */ |
|
16 |
|
17 var SECTION = "15.4.3.1-1"; |
|
18 var VERSION = "ECMA_1"; |
|
19 startTest(); |
|
20 var TITLE = "Array.prototype"; |
|
21 |
|
22 writeHeaderToLog( SECTION + " "+ TITLE); |
|
23 |
|
24 |
|
25 var ARRAY_PROTO = Array.prototype; |
|
26 |
|
27 new TestCase( SECTION, |
|
28 "var props = ''; for ( p in Array ) { props += p } props", |
|
29 "", |
|
30 eval("var props = ''; for ( p in Array ) { props += p } props") ); |
|
31 |
|
32 new TestCase( SECTION, |
|
33 "Array.prototype = null; Array.prototype", |
|
34 ARRAY_PROTO, |
|
35 eval("Array.prototype = null; Array.prototype") ); |
|
36 |
|
37 new TestCase( SECTION, |
|
38 "delete Array.prototype", |
|
39 false, |
|
40 delete Array.prototype ); |
|
41 |
|
42 new TestCase( SECTION, |
|
43 "delete Array.prototype; Array.prototype", |
|
44 ARRAY_PROTO, |
|
45 eval("delete Array.prototype; Array.prototype") ); |
|
46 |
|
47 test(); |