dotnet / dotnet/winforms

Investigate HtmlDocument tests that set focus to the document

Open
#4,906 0 comments 0 reactions 0 assignees View on GitHub
test-bug tracking-external-issue
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

`HtmlDocument_Focused_GetFocused_ReturnsExpected` and `HtmlDocument_Focus_Invoke_Success` tests are failing with inconsistent errors. Sometimes IHtmlDocument4.Focus succeeds and sometimes it does not.
https://dev.azure.com/dnceng/public/_build/results?buildId=1137942&view=ms.vss-test-web.build-test-results-tab&runId=34524282&resultId=103045&paneView=debug
```
Assert.True() Failure\r\nExpected: True\r\nActual: False

Stack trace
at System.Windows.Forms.Tests.HtmlDocumentTests.HtmlDocument_Focused_GetFocused_ReturnsExpected() in D:\workspace\_work\1\s\src\System.Windows.Forms\tests\UnitTests\System\Windows\Forms\HtmlDocumentTests.cs:line 648
--- End of stack trace from previous location ---
```
and sometimes
https://dev.azure.com/dnceng/internal/_build/results?buildId=1137596&view=ms.vss-test-web.build-test-results-tab&runId=34521092&resultId=107894&paneView=debug
```
Assert.False() Failure\r\nExpected: False\r\nActual: True

Stack trace
at System.Windows.Forms.Tests.HtmlDocumentTests.HtmlDocument_Focused_GetFocused_ReturnsExpected() in /_/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/HtmlDocumentTests.cs:line 644
--- End of stack trace from previous location ---
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.