link-load-fired-before-scripting-unblocked.html (1051B)
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_onload = false; 8 var t = async_test("Check if the stylesheet's load event is fired before the " + 9 "pending parsing-blocking script is unblocked"); 10 </script> 11 <link href="style.css?pipe=trickle(d3)" rel="stylesheet" id="style_test" 12 onload="t.step(function() { saw_link_onload = true; })" 13 onerror="t.unreached_func('Sheet should load OK')"> 14 <script> 15 t.step(function() { 16 assert_true(saw_link_onload, "The pending parsing-blocking script should " + 17 "only run after the last element that " + 18 "contributes a script-blocking style " + 19 "sheet's load event is fired."); 20 }); 21 t.done(); 22 </script> 23 </head> 24 </html>