tor-browser

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

builtin.js (1501B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2021 Igalia, S.L. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-temporal.plaindatetime.from
      7 description: Tests that Temporal.PlainDateTime.from meets the requirements for built-in objects
      8 info: |
      9    Built-in functions that are not constructors do not have a "prototype" property unless
     10    otherwise specified in the description of a particular function.
     11 
     12    Unless specified otherwise, a built-in object that is callable as a function is a built-in
     13    function object with the characteristics described in 10.3. Unless specified otherwise, the
     14    [[Extensible]] internal slot of a built-in object initially has the value true.
     15 
     16    Unless otherwise specified every built-in function and every built-in constructor has the
     17    Function prototype object [...] as the value of its [[Prototype]] internal slot.
     18 features: [Temporal]
     19 ---*/
     20 
     21 assert.sameValue(Object.isExtensible(Temporal.PlainDateTime.from),
     22  true, "Built-in objects must be extensible.");
     23 
     24 assert.sameValue(Object.prototype.toString.call(Temporal.PlainDateTime.from),
     25  "[object Function]", "Object.prototype.toString");
     26 
     27 assert.sameValue(Object.getPrototypeOf(Temporal.PlainDateTime.from),
     28  Function.prototype, "prototype");
     29 
     30 assert.sameValue(Temporal.PlainDateTime.from.hasOwnProperty("prototype"),
     31  false, "prototype property");
     32 
     33 reportCompare(0, 0);