js/src/tests/ecma/ExecutionContexts/10.2.1.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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.2.1.js
     9    ECMA Section:       10.2.1 Global Code
    10    Description:
    12    The scope chain is created and initialized to contain the global object and
    13    no others.
    15    Variable instantiation is performed using the global object as the variable
    16    object and using empty property attributes.
    18    The this value is the global object.
    19    Author:             christine@netscape.com
    20    Date:               12 november 1997
    21 */
    23 var SECTION = "10.2.1";
    24 var VERSION = "ECMA_1";
    25 startTest();
    26 var TITLE   = "Global Code";
    28 writeHeaderToLog( SECTION + " "+ TITLE);
    30 var THIS = this;
    32 new TestCase( SECTION,
    33 	      "this +''",
    34 	      GLOBAL,
    35 	      THIS + "" );
    37 var GLOBAL_PROPERTIES = new Array();
    38 var i = 0;
    40 for ( p in this ) {
    41   GLOBAL_PROPERTIES[i++] = p;
    42 }
    44 for ( i = 0; i < GLOBAL_PROPERTIES.length; i++ ) {
    45   new TestCase( SECTION,
    46 		GLOBAL_PROPERTIES[i] +" == void 0",
    47 		false,
    48 		eval("GLOBAL_PROPERTIES["+i+"] == void 0"));
    49 }
    51 test();

mercurial