tor-browser

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

15.2.3.6-4-531-12.js (1110B)


      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.6-4-531-12
      6 description: >
      7    Object.defineProperty will update [[Get]] and [[Set]] attributes
      8    of indexed accessor property successfully when [[Configurable]]
      9    attribute is true, 'O' is an Arguments object (8.12.9 step 11)
     10 includes: [propertyHelper.js]
     11 ---*/
     12 
     13 
     14 var obj = (function() {
     15  return arguments;
     16 }());
     17 
     18 obj.verifySetFunction = "data";
     19 Object.defineProperty(obj, "0", {
     20  get: function() {
     21    return obj.verifySetFunction;
     22  },
     23  set: function(value) {
     24    obj.verifySetFunction = value;
     25  },
     26  configurable: true
     27 });
     28 
     29 obj.verifySetFunction1 = "data1";
     30 var getFunc = function() {
     31  return obj.verifySetFunction1;
     32 };
     33 var setFunc = function(value) {
     34  obj.verifySetFunction1 = value;
     35 };
     36 
     37 Object.defineProperty(obj, "0", {
     38  get: getFunc,
     39  set: setFunc
     40 });
     41 
     42 verifyEqualTo(obj, "0", getFunc());
     43 
     44 verifyWritable(obj, "0", "verifySetFunction1");
     45 
     46 verifyProperty(obj, "0", {
     47  enumerable: false,
     48  configurable: true,
     49 });
     50 
     51 reportCompare(0, 0);