tor-browser

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

15.2.3.6-4-64.js (732B)


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