tor-browser

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

S11.8.6_A1.js (2055B)


      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    White Space and Line Terminator between RelationalExpression and
      7    "instanceof" and between "instanceof" and ShiftExpression are allowed
      8 es5id: 11.8.6_A1
      9 description: Checking by using eval
     10 ---*/
     11 
     12 //CHECK#1
     13 if (eval("({})\u0009instanceof\u0009Object") !== true) {
     14  throw new Test262Error('#1: ({})\\u0009instanceof\\u0009Object === true');
     15 }
     16 
     17 //CHECK#2
     18 if (eval("({})\u000Binstanceof\u000BObject") !== true) {
     19  throw new Test262Error('#2: ({})\\u000Binstanceof\\u000BObject === true');  
     20 }
     21 
     22 //CHECK#3
     23 if (eval("({})\u000Cinstanceof\u000CObject") !== true) {
     24  throw new Test262Error('#3: ({})\\u000Cinstanceof\\u000CObject === true');
     25 }
     26 
     27 //CHECK#4
     28 if (eval("({})\u0020instanceof\u0020Object") !== true) {
     29  throw new Test262Error('#4: ({})\\u0020instanceof\\u0020Object === true');
     30 }
     31 
     32 //CHECK#5
     33 if (eval("({})\u00A0instanceof\u00A0Object") !== true) {
     34  throw new Test262Error('#5: ({})\\u00A0instanceof\\u00A0Object === true');
     35 }
     36 
     37 //CHECK#6
     38 if (eval("({})\u000Ainstanceof\u000AObject") !== true) {
     39  throw new Test262Error('#6: ({})\\u000Ainstanceof\\u000AObject === true');  
     40 }
     41 
     42 //CHECK#7
     43 if (eval("({})\u000Dinstanceof\u000DObject") !== true) {
     44  throw new Test262Error('#7: ({})\\u000Dinstanceof\\u000DObject === true');
     45 }
     46 
     47 //CHECK#8
     48 if (eval("({})\u2028instanceof\u2028Object") !== true) {
     49  throw new Test262Error('#8: ({})\\u2028instanceof\\u2028Object === true');
     50 }
     51 
     52 //CHECK#9
     53 if (eval("({})\u2029instanceof\u2029Object") !== true) {
     54  throw new Test262Error('#9: ({})\\u2029instanceof\\u2029Object === true');
     55 }
     56 
     57 //CHECK#10
     58 if (eval("({})\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029instanceof\u0009\u000B\u000C\u0020\u00A0\u000A\u000D\u2028\u2029Object") !== true) {
     59  throw new Test262Error('#10: ({})\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029instanceof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Object === true');
     60 }
     61 
     62 reportCompare(0, 0);