tor-browser

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

15.2.3.6-4-65.js (731B)


      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-65
      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  if (!(e instanceof TypeError)) {
     26    throw new Test262Error("Expected TypeError, got " + e);
     27  }
     28 }
     29 
     30 verifyProperty(obj, "foo", {
     31  value: +0,
     32  writable: false,
     33  enumerable: false,
     34  configurable: false,
     35 });
     36 
     37 reportCompare(0, 0);