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-104.js (888B)


      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-104
      6 description: >
      7    Object.defineProperties - 'P' is accessor property, both
      8    properties.[[Set]] and P.[[Set]] are two different values (8.12.9
      9    step 12)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var obj = {};
     15 
     16 function get_func() {
     17  return 10;
     18 }
     19 
     20 function set_func() {
     21  return 10;
     22 }
     23 
     24 Object.defineProperty(obj, "foo", {
     25  get: get_func,
     26  set: set_func,
     27  enumerable: true,
     28  configurable: true
     29 });
     30 
     31 function set_func2(value) {
     32  obj.setVerifyHelpProp = value;
     33 }
     34 
     35 Object.defineProperties(obj, {
     36  foo: {
     37    set: set_func2
     38  }
     39 });
     40 verifyEqualTo(obj, "foo", get_func());
     41 
     42 verifyWritable(obj, "foo", "setVerifyHelpProp");
     43 
     44 verifyProperty(obj, "foo", {
     45  enumerable: true,
     46  configurable: true,
     47 });
     48 
     49 reportCompare(0, 0);