Added unit tests for low-coverage System.Windows.Forms classes - #14911
Open
Sathish-087 wants to merge 2 commits into
Open
Added unit tests for low-coverage System.Windows.Forms classes#14911Sathish-087 wants to merge 2 commits into
Sathish-087 wants to merge 2 commits into
Conversation
Member
|
@SimonZhao888, could you do a manual review of this? Thx! |
KlausLoeffelmann
requested review from
SimonZhao888
and
a balanced review from Copilot
August 31, 2026 16:04
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds unit coverage for previously low-coverage WinForms rendering, focus-restoration, and browser-history components.
Changes:
- Tests radio-button adapter painting and layout.
- Tests ToolStrip focus restoration.
- Tests HtmlHistory navigation, validation, and disposal.
File summaries
| File | Description |
|---|---|
RadioButtonFlatAdapterTests.cs |
Tests flat adapter rendering and layout. |
RadioButtonPopupAdapterTests.cs |
Tests popup adapter states and rendering. |
ToolStrip.RestoreFocusMessageFilterTests.cs |
Tests message filtering and focus restoration. |
HtmlHistoryTests.cs |
Tests history APIs and disposal behavior. |
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| Action action = () => adapter.PaintDown(e, control.Checked ? CheckState.Checked : CheckState.Unchecked); | ||
|
|
||
| action.Should().NotThrow(); |
|
|
||
| Action action = () => adapter.PaintDown(e, control.Checked ? CheckState.Checked : CheckState.Unchecked); | ||
|
|
||
| action.Should().NotThrow(); |
Comment on lines
+235
to
+236
| await Task.Run(() => control.Navigate(path)); | ||
| Assert.True(await source.Task); |
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.
Fixes #13442
Proposed changes
Customer Impact
Regression?
Risk
Test methodology
Accessibility testing
NA
Test environment(s)
Microsoft Reviewers: Open in CodeFlow