cross-origin-script-cors.sub.html (951B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 7 <script src="resources/profile-utils.js"></script> 8 9 <script crossorigin src="https://{{hosts[alt][]}}:{{ports[https][0]}}/js-self-profiling/resources/profiling-script.js"></script> 10 </head> 11 <body> 12 <script> 13 promise_test(async t => { 14 const trace = await ProfilingScript.profileBuiltinsInNewTask(); 15 16 // Ensure that signal from the external script was gathered. 17 assert_equals(trace.resources.length, 1); 18 assert_equals(trace.resources[0], 'https://{{hosts[alt][]}}:{{ports[https][0]}}/js-self-profiling/resources/profiling-script.js'); 19 assert_greater_than(trace.frames.length, 0); 20 assert_greater_than(trace.stacks.length, 0); 21 assert_greater_than(trace.samples.length, 0); 22 }, 'cors cross-origin script execution is not observable'); 23 </script> 24 </body> 25 </html>