remove-attr-style-keeps-blocking.html (877B)
1 <!DOCTYPE html> 2 <title>Parser-inserted style element still blocks rendering after removing `blocking=render`</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="support/test-render-blocking.js"></script> 6 7 <script> 8 // Test script must be added before the style element because the style 9 // element is script-blocking. 10 11 promise_setup(async () => { 12 let sheet = await nodeInserted(document.head, node => node.id === 'sheet'); 13 sheet.blocking = ''; 14 }); 15 16 test_render_blocking( 17 () => { 18 let color = getComputedStyle(document.querySelector('.target')).color; 19 assert_equals(color, 'rgb(255, 0, 0)'); 20 }, 21 'Render-blocking stylesheet is applied'); 22 </script> 23 24 <style id="sheet" blocking="render"> 25 @import url("support/target-red.css?pipe=trickle(d1)"); 26 </style> 27 28 <div class="target">Some text</div>