tor-browser

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

S11.8.6_A5_T2.js (1059B)


      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: TypeError is subclass of Error from instanceof operator point of view
      6 es5id: 11.8.6_A5_T2
      7 description: Checking TypeError case
      8 ---*/
      9 
     10 var __t__err = new TypeError;
     11 
     12 //CHECK#1
     13 if (!(__t__err instanceof Error)) {
     14 throw new Test262Error('#1: TypeError is subclass of Error from instanceof operator point of view');
     15 }
     16 
     17 //CHECK#2
     18 if (!(__t__err instanceof TypeError)) {
     19 throw new Test262Error('#2: TypeError is subclass of Error from instanceof operator point of view');
     20 }
     21 
     22 //////////////////////////////////////////////////////////////////////////////
     23 var err__t__ = TypeError('failed');
     24 
     25 //CHECK#3
     26 if (!(err__t__ instanceof Error)) {
     27 throw new Test262Error('#3: TypeError is subclass of Error from instanceof operator point of view');
     28 }
     29 
     30 //CHECK#4
     31 if (!(err__t__ instanceof TypeError)) {
     32 throw new Test262Error('#4: TypeError is subclass of Error from instanceof operator point of view');
     33 }
     34 
     35 reportCompare(0, 0);