tor-browser

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

prop-desc.js (964B)


      1 // |reftest| skip-if(release_or_beta) -- legacy-regexp is not released yet
      2 // Copyright (C) 2020 ExE Boss. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: pending
      6 description: Property descriptor for RegExp.$1-$9
      7 info: |
      8  RegExp.$1-$9 are accessor properties with attributes
      9  {
     10    [[Enumerable]]: false,
     11    [[Configurable]]: true,
     12    [[Set]]: undefined,
     13  }
     14 
     15  get RegExp.$1-$9
     16 
     17  1. Return ? GetLegacyRegExpStaticProperty(%RegExp%, this value, [[RegExpParen1-9]]).
     18 includes: [propertyHelper.js]
     19 features: [legacy-regexp]
     20 ---*/
     21 
     22 for (let i = 1; i <= 9; i++) {
     23  const property = "$" + i;
     24  const desc = Object.getOwnPropertyDescriptor(RegExp, property);
     25 
     26  assert.sameValue(desc.set, undefined, property + " setter");
     27  assert.sameValue(typeof desc.get, "function", property + " getter");
     28 
     29  verifyProperty(RegExp, property, {
     30    enumerable: false,
     31    configurable: true
     32  });
     33 }
     34 
     35 reportCompare(0, 0);