tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

global-object.js (944B)


      1 // Copyright (C) 2016 Jordan Harband. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-other-properties-of-the-global-object-globalthis
      6 description: "'globalThis' should be the global object"
      7 author: Jordan Harband
      8 features: [globalThis]
      9 ---*/
     10 
     11 assert.sameValue(this, globalThis);
     12 assert.sameValue(globalThis.globalThis, globalThis);
     13 
     14 assert.sameValue(Array, globalThis.Array);
     15 assert.sameValue(Boolean, globalThis.Boolean);
     16 assert.sameValue(Date, globalThis.Date);
     17 assert.sameValue(Error, globalThis.Error);
     18 assert.sameValue(Function, globalThis.Function);
     19 assert.sameValue(JSON, globalThis.JSON);
     20 assert.sameValue(Math, globalThis.Math);
     21 assert.sameValue(Number, globalThis.Number);
     22 assert.sameValue(RegExp, globalThis.RegExp);
     23 assert.sameValue(String, globalThis.String);
     24 
     25 var globalVariable = {};
     26 assert.sameValue(globalVariable, globalThis.globalVariable);
     27 
     28 reportCompare(0, 0);