js/src/tests/ecma/ExecutionContexts/10.1.5-4.js

Thu, 15 Jan 2015 21:13:52 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 21:13:52 +0100
branch
TOR_BUG_9701
changeset 12
7540298fafa1
permissions
-rw-r--r--

Remove forgotten relic of ABI crash risk averse overloaded method change.

     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/. */
     7 /**
     8    File Name:          10.1.5-4.js
     9    ECMA Section:       10.1.5 Global Object
    10    Description:
    11    There is a unique global object which is created before control enters
    12    any execution context. Initially the global object has the following
    13    properties:
    15    Built-in objects such as Math, String, Date, parseInt, etc. These have
    16    attributes { DontEnum }.
    18    Additional host defined properties. This may include a property whose
    19    value is the global object itself, for example window in HTML.
    21    As control enters execution contexts, and as ECMAScript code is executed,
    22    additional properties may be added to the global object and the initial
    23    properties may be changed.
    25    Author:             christine@netscape.com
    26    Date:               12 november 1997
    27 */
    28 var SECTION = "10.5.1-4";
    29 var VERSION = "ECMA_1";
    30 startTest();
    32 writeHeaderToLog( SECTION + " Global Object");
    34 new TestCase( "SECTION", "Anonymous Code check" );
    37 var EVAL_STRING = 'if ( Object == null ) { gTestcases[0].reason += " Object == null" ; }' +
    38   'if ( Function == null ) { gTestcases[0].reason += " Function == null"; }' +
    39   'if ( String == null ) { gTestcases[0].reason += " String == null"; }'   +
    40   'if ( Array == null ) { gTestcases[0].reason += " Array == null"; }'     +
    41   'if ( Number == null ) { gTestcases[0].reason += " Function == null";}'  +
    42   'if ( Math == null ) { gTestcases[0].reason += " Math == null"; }'       +
    43   'if ( Boolean == null ) { gTestcases[0].reason += " Boolean == null"; }' +
    44   'if ( Date  == null ) { gTestcases[0].reason += " Date == null"; }'      +
    45   'if ( eval == null ) { gTestcases[0].reason += " eval == null"; }'       +
    46   'if ( parseInt == null ) { gTestcases[0].reason += " parseInt == null"; }' ;
    48 var NEW_FUNCTION = new Function( EVAL_STRING );
    50 if ( gTestcases[0].reason != "" ) {
    51   gTestcases[0].actual = "fail";
    52 } else {
    53   gTestcases[0].actual = "pass";
    54 }
    55 gTestcases[0].expect = "pass";
    57 test();

mercurial