tor-browser

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

regress-313803.js (807B)


      1 // |reftest| skip-if(!this.uneval)
      2 
      3 /* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
      4 /* This Source Code Form is subject to the terms of the Mozilla Public
      5 * License, v. 2.0. If a copy of the MPL was not distributed with this
      6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      7 
      8 //-----------------------------------------------------------------------------
      9 var BUGNUMBER = 313803;
     10 var summary = 'uneval() on func with embedded objects with getter or setter';
     11 var actual = '';
     12 var expect = '';
     13 
     14 printBugNumber(BUGNUMBER);
     15 printStatus (summary);
     16 
     17 var func = function ff() {
     18  obj = { get foo() { return "foo"; }};
     19  return 1;
     20 };
     21 
     22 actual = uneval(func);
     23 
     24 expect = '(function ff() {\n\
     25  obj = { get foo() { return "foo"; }};\n\
     26  return 1;\n\
     27 })';
     28 
     29 compareSource(expect, actual, summary);