Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | |
michael@0 | 7 | /** |
michael@0 | 8 | File Name: 10.1.5-1.js |
michael@0 | 9 | ECMA Section: 10.1.5 Global Object |
michael@0 | 10 | Description: |
michael@0 | 11 | There is a unique global object which is created before control enters |
michael@0 | 12 | any execution context. Initially the global object has the following |
michael@0 | 13 | properties: |
michael@0 | 14 | |
michael@0 | 15 | Built-in objects such as Math, String, Date, parseInt, etc. These have |
michael@0 | 16 | attributes { DontEnum }. |
michael@0 | 17 | |
michael@0 | 18 | Additional host defined properties. This may include a property whose |
michael@0 | 19 | value is the global object itself, for example window in HTML. |
michael@0 | 20 | |
michael@0 | 21 | As control enters execution contexts, and as ECMAScript code is executed, |
michael@0 | 22 | additional properties may be added to the global object and the initial |
michael@0 | 23 | properties may be changed. |
michael@0 | 24 | |
michael@0 | 25 | Author: christine@netscape.com |
michael@0 | 26 | Date: 12 november 1997 |
michael@0 | 27 | */ |
michael@0 | 28 | var SECTION = "10.5.1-1"; |
michael@0 | 29 | var VERSION = "ECMA_1"; |
michael@0 | 30 | startTest(); |
michael@0 | 31 | |
michael@0 | 32 | writeHeaderToLog( SECTION + " Global Object"); |
michael@0 | 33 | |
michael@0 | 34 | |
michael@0 | 35 | new TestCase( "SECTION", "Global Code check" ); |
michael@0 | 36 | |
michael@0 | 37 | if ( Object == null ) { |
michael@0 | 38 | gTestcases[0].reason += " Object == null" ; |
michael@0 | 39 | } |
michael@0 | 40 | if ( Function == null ) { |
michael@0 | 41 | gTestcases[0].reason += " Function == null"; |
michael@0 | 42 | } |
michael@0 | 43 | if ( String == null ) { |
michael@0 | 44 | gTestcases[0].reason += " String == null"; |
michael@0 | 45 | } |
michael@0 | 46 | if ( Array == null ) { |
michael@0 | 47 | gTestcases[0].reason += " Array == null"; |
michael@0 | 48 | } |
michael@0 | 49 | if ( Number == null ) { |
michael@0 | 50 | gTestcases[0].reason += " Function == null"; |
michael@0 | 51 | } |
michael@0 | 52 | if ( Math == null ) { |
michael@0 | 53 | gTestcases[0].reason += " Math == null"; |
michael@0 | 54 | } |
michael@0 | 55 | if ( Boolean == null ) { |
michael@0 | 56 | gTestcases[0].reason += " Boolean == null"; |
michael@0 | 57 | } |
michael@0 | 58 | if ( Date == null ) { |
michael@0 | 59 | gTestcases[0].reason += " Date == null"; |
michael@0 | 60 | } |
michael@0 | 61 | /* |
michael@0 | 62 | if ( NaN == null ) { |
michael@0 | 63 | gTestcases[0].reason += " NaN == null"; |
michael@0 | 64 | } |
michael@0 | 65 | if ( Infinity == null ) { |
michael@0 | 66 | gTestcases[0].reason += " Infinity == null"; |
michael@0 | 67 | } |
michael@0 | 68 | */ |
michael@0 | 69 | if ( eval == null ) { |
michael@0 | 70 | gTestcases[0].reason += " eval == null"; |
michael@0 | 71 | } |
michael@0 | 72 | if ( parseInt == null ) { |
michael@0 | 73 | gTestcases[0].reason += " parseInt == null"; |
michael@0 | 74 | } |
michael@0 | 75 | |
michael@0 | 76 | if ( gTestcases[0].reason != "" ) { |
michael@0 | 77 | gTestcases[0].actual = "fail"; |
michael@0 | 78 | } else { |
michael@0 | 79 | gTestcases[0].actual = "pass"; |
michael@0 | 80 | } |
michael@0 | 81 | gTestcases[0].expect = "pass"; |
michael@0 | 82 | |
michael@0 | 83 | test(); |
michael@0 | 84 |