tor-browser

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

boolean-trap-result-boolean-false.js (748B)


      1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 es6id: 9.5.10
      5 description: >
      6    [[Delete]] (P)
      7 
      8    The result is a Boolean value.
      9 features: [Proxy, Reflect]
     10 ---*/
     11 
     12 var target = {};
     13 var p = new Proxy(target, {
     14  deleteProperty: function() {
     15    return 0;
     16  }
     17 });
     18 
     19 Object.defineProperties(target, {
     20  isConfigurable: {
     21    value: 1,
     22    configurable: true
     23  },
     24  notConfigurable: {
     25    value: 1,
     26    configurable: false
     27  }
     28 });
     29 
     30 assert.sameValue(Reflect.deleteProperty(p, "attr"), false);
     31 assert.sameValue(Reflect.deleteProperty(p, "isConfigurable"), false);
     32 assert.sameValue(Reflect.deleteProperty(p, "notConfigurable"), false);
     33 
     34 reportCompare(0, 0);