tor-browser

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

limits.js (802B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2024 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-temporal.instant.fromepochnanoseconds
      7 description: >
      8  Throws a RangeError if the input is not a valid epoch nanoseconds value.
      9 info: |
     10  Temporal.Instant.fromEpochNanoseconds ( epochNanoseconds )
     11 
     12  ...
     13  2. If IsValidEpochNanoseconds(epochNanoseconds) is false, throw a RangeError exception.
     14  ...
     15 features: [Temporal]
     16 ---*/
     17 
     18 var limit = 8640000000000000000000n;
     19 
     20 assert.throws(RangeError, () => Temporal.Instant.fromEpochNanoseconds(-limit - 1n));
     21 assert.throws(RangeError, () => Temporal.Instant.fromEpochNanoseconds(limit + 1n));
     22 
     23 reportCompare(0, 0);