Repository navigation
desktop::uia: live walk test bounds the numbers, not the distance (refs #52) - #55
Merged
Merged
Conversation
…ce from the screen (refs #52) the_focused_window_can_be_walked required every element within one desktop's size of the desktop, to catch garbage pixels. Web pages break that with real elements: UI Automation reports where off-screen content truly is, and text kept for screen readers is drawn 1x1 far outside the view -- on one focused page an element at y = -16079 failed the test 3 of 3 times, while CI (no such window) passed. A long page's content far below the fold would fail it the same way. The per-element check now asks what it was for: are the numbers screen pixels at all (both edges within 2^24 px of the origin), refusing unset or overflowed values near i32::MIN / i32::MAX. That the window is in the mouse's coordinate space stays checked by the next assertion, unchanged. plausible_coordinates_are_screen_pixels_not_garbage pins the #52 element, a far-below-the-fold one and the garbage cases; with plausible() forced true it fails on "an unset coordinate".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test half of #52.
Problem:
the_focused_window_can_be_walkedrequired every element to be within one desktop's size of the desktop. Browsers report real off-screen positions, though:y = -16079here, which failed 3 of 3 runs);Fix: the per-element check now asks whether the coordinates are screen pixels at all: both edges within 2^24 px of the origin, which refuses unset or overflowed values near
i32::MIN/i32::MAX. The "window is in the mouse's coordinate space" assertion is unchanged.Test:
plausible_coordinates_are_screen_pixels_not_garbagepins the #52 element, a below-the-fold element and the garbage cases. Control: withplausible()forced true, it fails on "an unset coordinate". UIA tests pass 20/20; fmt and clippy are clean.Still open in #52: whether the walk itself should drop elements that are entirely off every screen. That's a product decision this PR doesn't make.