tor-browser

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

undefined-newtarget-throws.js (632B)


      1 // Copyright (C) 2019 Leo Balter. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 esid: sec-Intl.DisplayNames
      6 description: >
      7  Throws a TypeError if Intl.DisplayNames is called as a function.
      8 info: |
      9  Intl.DisplayNames ([ locales [ , options ]])
     10 
     11  1. If NewTarget is undefined, throw a TypeError exception.
     12  ...
     13 features: [Intl.DisplayNames]
     14 ---*/
     15 
     16 assert.throws(TypeError, function() {
     17  Intl.DisplayNames();
     18 });
     19 
     20 assert.throws(TypeError, function() {
     21  Intl.DisplayNames('en');
     22 });
     23 
     24 assert.throws(TypeError, function() {
     25  Intl.DisplayNames(['en']);
     26 });
     27 
     28 reportCompare(0, 0);