Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic integration tests for NativeControlHost and improve its automation/a11y support. #15542

Merged
merged 22 commits into from
Aug 5, 2024

Conversation

grokys
Copy link
Member

@grokys grokys commented Apr 27, 2024

What does the pull request do?

Adds a couple of basic integration tests for NativeControlHost. To do this I had to improve automation/a11y support for embedding native controls.

The PR adds a new, internal, InteropAutomationPeer which is used by the new NativeControlHostPeer as a sentinel value indicating "forward the a11y/automation to a native control. This InteropAutomationPeer is then special-cased in the win32 and macOS backends.

grokys and others added 7 commits April 26, 2024 12:19
Currently embeds a lone native text box, and only when running on Windows.
Allows native controls to appear in the Avalonia automation tree as a child of the `NativeControlHost`. They also appear in the _wrong_ place - as a direct child of the `Window` - but this appears to be expected behavior as it happens when hosting a win32 control in WPF as well.
Implements special-casing of `InteropAutomationPeer`on macOS.
The test for the native control in a popup is disabled on macOS because we have a bug there.
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0047835-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Apr 27, 2024

  • All contributors have signed the CLA.

@grokys
Copy link
Member Author

grokys commented Apr 28, 2024

@cla-avalonia agree

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0048795-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/microsoft/CsWin32

with NativeMethods.txt file:

CreateWindowEx
GetModuleHandle
DestroyWindow

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049037-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049818-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

…oniaUI/Avalonia into feature/embedding-integration-tests

# Conflicts:
#	native/Avalonia.Native/src/OSX/automation.mm
@grokys grokys marked this pull request as ready for review July 26, 2024 08:51
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050503-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys grokys force-pushed the feature/embedding-integration-tests branch from 892c7ef to 1821c29 Compare July 26, 2024 13:35
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050516-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys grokys added area-infrastructure Issues related to CI/tooling infrastructur feature enhancement and removed no-merge area-infrastructure Issues related to CI/tooling infrastructur feature labels Jul 26, 2024
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050532-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050621-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050633-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050651-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050663-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050679-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@grokys grokys force-pushed the feature/embedding-integration-tests branch from 508bae9 to 6766763 Compare July 30, 2024 14:00
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0050968-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 merged commit c6cdbfe into master Aug 5, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the feature/embedding-integration-tests branch August 5, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants