(bridge: &NativeBridge, udid: &str)
| 5804 | } |
| 5805 | |
| 5806 | fn accessibility_root_size(bridge: &NativeBridge, udid: &str) -> Option<(f64, f64)> { |
| 5807 | let snapshot = bridge.accessibility_snapshot(udid, None).ok()?; |
| 5808 | let frame = snapshot.get("roots")?.as_array()?.first()?.get("frame")?; |
| 5809 | let width = frame.get("width")?.as_f64()?; |
| 5810 | let height = frame.get("height")?.as_f64()?; |
| 5811 | (width > 0.0 && height > 0.0).then_some((width, height)) |
| 5812 | } |
| 5813 | |
| 5814 | fn chrome_screen_size(bridge: &NativeBridge, udid: &str) -> Option<(f64, f64)> { |
| 5815 | let profile = bridge.chrome_profile(udid).ok()?; |
no test coverage detected