tor-browser

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

resolvedOptions-overridden-species.js (655B)


      1 // |reftest| skip-if(!this.hasOwnProperty("Intl"))
      2 
      3 // Tests the PluralRules.resolvedOptions function for overriden Array[Symbol.species].
      4 
      5 var pl = new Intl.PluralRules("de");
      6 
      7 Object.defineProperty(Array, Symbol.species, {
      8    value: function() {
      9        return new Proxy(["?"], {
     10            get(t, pk, r) {
     11                return Reflect.get(t, pk, r);
     12            },
     13            defineProperty(t, pk) {
     14                return true;
     15            }
     16        });
     17    }
     18 });
     19 
     20 var pluralCategories = pl.resolvedOptions().pluralCategories;
     21 
     22 assertEqArray(pluralCategories, ["one", "other"]);
     23 
     24 if (typeof reportCompare === "function")
     25    reportCompare(0, 0);