eval-scripts-setTimeout-allowed.sub.html (890B)
1 <!DOCTYPE html> 2 <html> 3 4 <head> 5 <!-- Programmatically converted from a WebKit Reftest, please forgive resulting idiosyncracies.--> 6 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src 'self';"> 7 <title>eval-scripts-setTimeout-allowed</title> 8 <script src="/resources/testharness.js"></script> 9 <script src="/resources/testharnessreport.js"></script> 10 <script src='../support/logTest.sub.js?logs=["PASS 1 of 2","PASS 2 of 2"]'></script> 11 <script src='../support/alertAssert.sub.js?alerts=[]'></script> 12 </head> 13 <script> 14 window.addEventListener('securitypolicyviolation', function(e) { 15 log("Fail"); 16 }); 17 18 var id = setTimeout("log('PASS 1 of 2')", 0); 19 if (id == 0) 20 log('FAIL'); 21 var id = setTimeout(function() { 22 log('PASS 2 of 2'); 23 }, 0); 24 if (id == 0) 25 log('FAIL'); 26 </script> 27 28 </html>