Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1211,3 +1211,21 @@ fn content_outside_a_shrunk_viewport_gives_way_to_the_viewport() {
|
||||
assert!(free.min.x.is_finite() && free.min.y.is_finite(), "{free:?}");
|
||||
}
|
||||
}
|
||||
|
||||
/// The interface scale raised after a click at the top of a narrow window (found by a UI fuzzer
|
||||
/// and shrunk to these three steps): the content kept from the frame before lay outside the new
|
||||
/// viewport, and the next frame's layout panicked clamping into it (`min = 264.0, max =
|
||||
/// 165.28125`).
|
||||
#[test]
|
||||
fn a_larger_interface_scale_in_a_narrow_window_keeps_drawing() {
|
||||
let mut h = Harness::new();
|
||||
for step in [
|
||||
json!({"call": "ui.resize", "params": {"width": 330.5693343218654, "height": 1445.8773151935186}}),
|
||||
json!({"click": [206.1875, 17.0]}),
|
||||
json!({"call": "ui.prefs", "params": {"ui_scale": 2.0}}),
|
||||
] {
|
||||
h.step(&step).unwrap();
|
||||
}
|
||||
h.frames(3);
|
||||
assert!(h.app.viewport.rect.unwrap().is_positive());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user