tor-browser

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

options-null.js (778B)


      1 // Copyright 2018 Igalia, S.L. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-Intl.Segmenter.supportedLocalesOf
      6 description: Checks handling of a null options argument to the supportedLocalesOf function.
      7 info: |
      8    SupportedLocales ( availableLocales, requestedLocales, options )
      9 
     10    1. If options is not undefined, then
     11        a. Let options be ? ToObject(options).
     12 features: [Intl.Segmenter]
     13 ---*/
     14 
     15 assert.sameValue(typeof Intl.Segmenter.supportedLocalesOf, "function",
     16                 "Should support Intl.Segmenter.supportedLocalesOf.");
     17 
     18 assert.throws(TypeError, function() {
     19  Intl.Segmenter.supportedLocalesOf([], null);
     20 }, "Should throw when passing null as the options argument");
     21 
     22 reportCompare(0, 0);