remove-float-in-first-line.html (813B)
1 <!DOCTYPE html> 2 <title>Removing floats in ::first-line should not crash</title> 3 <link rel="author" href="kojii@chromium.org"> 4 <link rel="help" href="https://crbug.com/1100900"> 5 <meta name="assert" content="Removing floats in ::first-line should not crash"> 6 <style> 7 #container { 8 display: flow-root; 9 } 10 #container::first-line { 11 background: orange; 12 } 13 #float { 14 float: left; 15 } 16 </style> 17 <script src="/resources/testharness.js"></script> 18 <script src="/resources/testharnessreport.js"></script> 19 <body> 20 <div id="container">text<span id="float"></span></div> 21 </body> 22 <script> 23 test(() => { 24 document.body.offsetTop; 25 let float = document.getElementById('float'); 26 float.remove(); 27 let container = document.getElementById('container'); 28 container.style.color = 'blue'; 29 }, 'No crash or DCHECK failure'); 30 </script>