tor-browser

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

class-getter-names.https.html (764B)


      1 <!DOCTYPE html>
      2 <html>
      3 
      4 <head>
      5  <script src="/resources/testharness.js"></script>
      6  <script src="/resources/testharnessreport.js"></script>
      7 
      8  <script src="resources/profile-utils.js"></script>
      9 </head>
     10 
     11 <body>
     12  <script>
     13    // Getter methods should use `get ${label}` as the function/frame name. Source:
     14    // https://www.ecma-international.org/ecma-262/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation
     15    promise_test(t => ProfileUtils.testFunction(sample => {
     16      class SomeClass {
     17        get someValue() {
     18          sample();
     19        }
     20      }
     21      let instance = new SomeClass();
     22      instance.someValue;
     23    }, {
     24      name: 'get someValue',
     25    }
     26    ), 'class getter names are logged correctly');
     27  </script>
     28 </body>
     29 
     30 </html>