several breakable words need wrapping here
"#,
);
let layout = layout_dom(&tree, (500.0, 200.0));
let rect = layout.rects[&tree.get_element_by_id("fit").unwrap()];
assert!(
(rect.width - 140.0).abs() < 0.1,
"fit-content should clamp max-content to the containing block: {rect:?}"
);
assert!(
rect.height >= 40.0,
"the clamped fit-content box must reflow its breakable text: {rect:?}"
);
}
#[test]
fn fit_content_width_keeps_an_unbreakable_min_content_floor() {
let tree = parse_html(
r#"