tor-browser

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

symbol-object-contains-symbol-properties-non-strict.js (657B)


      1 // Copyright (C) 2013 the V8 project authors. All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 /*---
      4 esid: sec-object.seal
      5 description: >
      6    Object.seal(obj) where obj contains symbol properties.
      7 flags: [noStrict]
      8 features: [Symbol]
      9 ---*/
     10 var symA = Symbol("A");
     11 var symB = Symbol("B");
     12 var obj = {};
     13 obj[symA] = 1;
     14 Object.seal(obj);
     15 obj[symA] = 2;
     16 obj[symB] = 1;
     17 
     18 assert.sameValue(obj[symA], 2, "The value of `obj[symA]` is `2`");
     19 assert.sameValue(delete obj[symA], false, "`delete obj[symA]` is `false`");
     20 assert.sameValue(obj[symB], undefined, "The value of `obj[symB]` is `undefined`");
     21 
     22 reportCompare(0, 0);