inlineSuccessTest.js (437B)
1 var t_spv = async_test("Should not fire policy violation events"); 2 window.addEventListener("securitypolicyviolation", t_spv.unreached_func("Should have not fired any securitypolicyviolation event")); 3 4 var inlineRan = false; 5 6 onload = function() { 7 test(function() { 8 assert_true(inlineRan, 'Unsafe inline script ran.')}, 9 'Inline script in a script tag should run with an unsafe-inline directive' 10 ); 11 t_spv.done(); 12 }