computed-float-position-absolute.html (999B)
1 <!doctype html> 2 <link rel="help" href="https://drafts.csswg.org/css2/visuren.html" /> 3 <title>The computed value of float with absolute positioning when there is no box should be "none"</title> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <style> 7 8 div[id] { 9 position: absolute; 10 float: left; 11 } 12 13 </style> 14 15 <div id="test1" style="display: none"></div> 16 <div id="test2" style="display: contents"></div> 17 <div style="display: none"><div id="test3"></div></div> 18 19 <script> 20 promise_test( 21 t => { 22 return new Promise(test => addEventListener('load', e=>test())) 23 .then(test => assert_equals(getComputedStyle(test1)['float'], "none", "[display:none] Invalid gCS(test1)['float'];")) 24 .then(test => assert_equals(getComputedStyle(test2)['float'], "none", "[display:contents] Invalid gCS(test2)['float'];")) 25 .then(test => assert_equals(getComputedStyle(test3)['float'], "none", "[in a display:none] Invalid gCS(test3)['float'];")) 26 } 27 ); 28 </script>