link-error-fired-before-scripting-unblocked.html (1119B)
1 <!DOCTYPE html> 2 <link rel="author" title="Dom Farolino" href="mailto:dom@chromium.org"> 3 <link rel="help" href="https://html.spec.whatwg.org/multipage/links.html#link-type-stylesheet"> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <script> 7 var saw_link_onerror = false; 8 var t = async_test("Check if the stylesheet's error event is fired before the " + 9 "pending parsing-blocking script is unblocked"); 10 </script> 11 <link href="nonexistent.css" rel="stylesheet" id="style_test" 12 onload="t.unreached_func('Sheet should fail to load')" 13 onerror="t.step(function() { saw_link_onerror = true; })"> 14 <script> 15 t.step(function() { 16 assert_true(saw_link_onerror, "The pending parsing-blocking script should " + 17 "only run after the last element that " + 18 "contributes a script-blocking style " + 19 "sheet's error event is fired if the sheet " + 20 "fails to load."); 21 }); 22 t.done(); 23 </script> 24 </head> 25 </html>