tor-browser

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

S15.10.4.1_A5_T3.js (764B)


      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    If F contains any character other than 'g', 'i', or 'm', or if it
      7    contains the same one more than once, then throw a SyntaxError exception
      8 es5id: 15.10.4.1_A5_T3
      9 description: Checking by using eval, try to use eval("\"migr\"") as F
     10 ---*/
     11 
     12 try {
     13    throw new Test262Error('#1.1: new RegExp("",eval("\\"migr\\"")) throw SyntaxError. Actual: ' + (new RegExp("",eval("\"migr\""))));
     14 } catch (e) {
     15  assert.sameValue(
     16    e instanceof SyntaxError,
     17    true,
     18    'The result of evaluating (e instanceof SyntaxError) is expected to be true'
     19  );
     20 }
     21 
     22 // TODO: Convert to assert.throws() format.
     23 
     24 reportCompare(0, 0);