tor-browser

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

regress-306738.js (730B)


      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 = 306738;
     10 var summary = 'uneval() on objects with getter or setter';
     11 var actual = '';
     12 var expect = '';
     13 
     14 printBugNumber(BUGNUMBER);
     15 printStatus (summary);
     16 
     17 actual = uneval(
     18  {
     19    get foo()
     20    {
     21      return "foo";
     22    }
     23  });
     24 
     25 expect = '({get foo()\n\
     26    {\n\
     27      return "foo";\n\
     28    }})';
     29 
     30 compareSource(expect, actual, summary);