tor-browser

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

legacy-regexp-statics-not-modified.js (593B)


      1 // Copyright 2013 Mozilla Corporation. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 11.1.1_a
      6 description: >
      7    Tests that constructing a NumberFormat doesn't create or modify
      8    unwanted properties on the RegExp constructor.
      9 author: Norbert Lindenberg
     10 includes: [testIntl.js]
     11 ---*/
     12 
     13 testForUnwantedRegExpChanges(function () {
     14    new Intl.NumberFormat("de-DE-u-nu-latn");
     15 });
     16 
     17 testForUnwantedRegExpChanges(function () {
     18    new Intl.NumberFormat("de-DE-u-nu-latn", {style: "currency", currency: "EUR"});
     19 });
     20 
     21 reportCompare(0, 0);