<head> <title>Test case for bug https://bugs.webkit.org/show_bug.cgi?id=85991</title> <script src="../../resources/js-test.js"></script> </head> <style> #outer { display: -webkit-box; } #inner { overflow: hidden; max-width: max-content; width: 0px; -webkit-box-flex: 60; } </style> <div id="outer"> <div id="inner">PASS</div> </div> <script> description("Tests if the Deprecated Flex boxes with max-width: max-content and width:0 has non-zero calculated width"); var x = document.getElementById('inner'); var flexBoxDiv = x.getClientRects()[0]; shouldBeNonZero("flexBoxDiv.width"); //cleanup var node = document.getElementById('inner'); node.parentNode.removeChild(node); </script>