class-names.https.html (760B)
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 // Methods should use their label as the function/frame name. Source: 14 // https://www.ecma-international.org/ecma-262/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation 15 promise_test(async t => { 16 class SomeClass { 17 method(sample) { 18 sample(); 19 } 20 } 21 let instance = new SomeClass(); 22 23 await ProfileUtils.testFunction(instance.method.bind(instance), { 24 name: 'method', 25 }); 26 }, 'class method names are logged correctly'); 27 </script> 28 </body> 29 30 </html>