tor-browser

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

S8.12.7_A2_T1.js (1537B)


      1 // Copyright 2009 the Sputnik authors.  All rights reserved.
      2 // This code is governed by the BSD license found in the LICENSE file.
      3 
      4 /*---
      5 info: |
      6    When the [[Delete]] method of O is called with property name P,
      7    and if O doesn't have a property with name P, return true
      8 esid: sec-delete-operator-runtime-semantics-evaluation
      9 description: Try to delete not existent properties
     10 ---*/
     11 
     12 var __color__map = {};
     13 
     14 //////////////////////////////////////////////////////////////////////////////
     15 //CHECK#1
     16 if (delete __color__map.red !== true) {
     17  throw new Test262Error(
     18    '#1: var __color__map = {}; delete __color__map.red === true. Actual: ' +
     19    delete __color__map.red
     20  );
     21 }
     22 //
     23 //////////////////////////////////////////////////////////////////////////////
     24 
     25 //////////////////////////////////////////////////////////////////////////////
     26 //CHECK#2
     27 if (delete __color__map['green'] !== true) {
     28  throw new Test262Error(
     29    '#2: var __color__map = {}; delete __color__map["green"] === true. Actual: ' +
     30    delete __color__map['green']
     31  );
     32 }
     33 //
     34 //////////////////////////////////////////////////////////////////////////////
     35 
     36 //////////////////////////////////////////////////////////////////////////////
     37 //CHECK#3
     38 var blue = 1;
     39 if (delete __color__map[blue] !== true) {
     40  throw new Test262Error(
     41    '#3: var __color__map = {}; var blue = 1; delete __color__map[blue] === true. Actual: ' +
     42    delete __color__map[blue]
     43  );
     44 }
     45 //
     46 //////////////////////////////////////////////////////////////////////////////
     47 
     48 reportCompare(0, 0);