tor-browser

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

observable-get-overflow-argument-string-invalid.js (796B)


      1 // |reftest| skip-if(!this.hasOwnProperty('Temporal')) -- Temporal is not enabled unconditionally
      2 // Copyright (C) 2023 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.zoneddatetime.from
      7 description: options properties are not extracted with ISO-invalid string argument.
      8 includes: [compareArray.js, temporalHelpers.js]
      9 features: [Temporal]
     10 ---*/
     11 
     12 let actual = [];
     13 const options = TemporalHelpers.propertyBagObserver(actual, {
     14  disambiguation: "compatible",
     15  offset: "ignore",
     16  overflow: "reject",
     17 }, "options");
     18 
     19 assert.throws(RangeError, () => Temporal.ZonedDateTime.from("2020-13-34T25:60:60+99:99[UTC]", options));
     20 assert.compareArray(actual, [], "options read after string parsing");
     21 
     22 reportCompare(0, 0);