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-46.js (765B)


      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-46
      6 description: >
      7    Object.defineProperties - desc.value is -0 and P.value is +0
      8    (8.12.9 step 6)
      9 includes: [propertyHelper.js]
     10 ---*/
     11 
     12 
     13 var obj = {};
     14 
     15 var desc = {
     16  value: +0
     17 };
     18 Object.defineProperty(obj, "foo", desc);
     19 
     20 try {
     21  Object.defineProperties(obj, {
     22    foo: {
     23      value: -0
     24    }
     25  });
     26  throw new Test262Error("Expected an exception.");
     27 } catch (e) {
     28  if (!(e instanceof TypeError)) {
     29    throw new Test262Error("Expected TypeError, got " + e);
     30  }
     31 }
     32 
     33 verifyProperty(obj, "foo", {
     34  value: +0,
     35  writable: false,
     36  enumerable: false,
     37  configurable: false,
     38 });
     39 
     40 reportCompare(0, 0);