tor-browser

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

15.2.3.7-6-a-89.js (917B)


      1 // Copyright (c) 2012 Ecma International.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 es5id: 15.2.3.7-6-a-89
      6 description: >
      7    Object.defineProperties will not throw TypeError when
      8    P.configurable is false, P.[[Set]] and properties.[[Set]] are
      9    undefined (8.12.9 step 11.a.i)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var obj = {};
     15 
     16 function get_Func() {
     17  return 0;
     18 }
     19 
     20 Object.defineProperty(obj, "foo", {
     21  get: get_Func,
     22  set: undefined,
     23  enumerable: false,
     24  configurable: false
     25 });
     26 
     27 Object.defineProperties(obj, {
     28  foo: {
     29    set: undefined
     30  }
     31 });
     32 
     33 verifyProperty(obj, "foo", {
     34  enumerable: false,
     35  configurable: false,
     36 });
     37 
     38 var desc = Object.getOwnPropertyDescriptor(obj, "foo");
     39 
     40 if (typeof(desc.set) !== "undefined") {
     41  throw new Test262Error('Expected typeof (desc.set) === "undefined", actually ' + typeof(desc.set));
     42 }
     43 
     44 reportCompare(0, 0);