tor-browser

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

async-func-decl-no-pre-existing-arguments-bindings-are-present-declare-arguments-and-assign.js (791B)


      1 // |reftest| async
      2 // This file was procedurally generated from the following sources:
      3 // - src/direct-eval-code/declare-arguments-and-assign.case
      4 // - src/direct-eval-code/default/async-func-decl/no-pre-existing-arguments-bindings-are-present.template
      5 /*---
      6 description: Declare "arguments" and assign to it in direct eval code (Declare |arguments| when no pre-existing |arguments| bindings are present.)
      7 esid: sec-evaldeclarationinstantiation
      8 features: [globalThis]
      9 flags: [generated, async, noStrict]
     10 ---*/
     11 
     12 const oldArguments = globalThis.arguments;
     13 async function f(p = eval("var arguments = 'param'")) {}
     14 f().then($DONE, error => {
     15  assert(error instanceof SyntaxError);
     16  assert.sameValue(globalThis.arguments, oldArguments, "globalThis.arguments unchanged");
     17 }).then($DONE, $DONE);