inline-script-should-be-blocked.js (444B)
1 var t; 2 async_test(t => { 3 self.t = t; 4 const s = document.createElement('script'); 5 s.onerror = t.step_func(function() { 6 assert_unreached('Script error event should not be fired.'); 7 }); 8 s.onload = t.step_func(function() { 9 assert_unreached('Script load event should not be fired.'); 10 }); 11 s.innerText = 'self.t.assert_unreached("Script should not run.");' 12 document.body.appendChild(s); 13 setTimeout(() => t.done(), 2000); 14 });