Test InputLanguage without modifying the Windows language list - #15076
Open
Eales wants to merge 1 commit into
Open
Test InputLanguage without modifying the Windows language list#15076Eales wants to merge 1 commit into
Eales wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15076 +/- ##
=============================================
Coverage 37.24166% 37.24166%
=============================================
Files 246 246
Lines 9774 9774
Branches 1029 1029
=============================================
Hits 3640 3640
Misses 5970 5970
Partials 164 164
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Eales
marked this pull request as ready for review
September 10, 2026 16:26
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 #13274
cc @LeafShi1: this issue is still assigned to you. I did not find an open PR touching
these files; please let me know if there is ongoing work to coordinate with. Opening
as a draft for that coordination and review of the small internal testability extraction.
Proposed changes
deterministic tests of the existing language-tag mapping. Tests no longer call
Set-WinUserLanguageListor modify the user's installed language list.transient keyboard IDs with
got-Goth,jv-Java,zgh-Tfng, andnqo, plusnon-transient bypass, first-match selection, and the existing
CultureInfofallbackfor empty/nonmatching sources. Production registry lookup remains lazy and ordered.
FromCulture, current-language, and associated event-argstests. Handle multiple layouts sharing a culture without assuming that
FromCultureselects a particular handle other than the first matching installed layout.
finally, on success and failure.The old setter test's
catchswallowed assertion failures. Remove event-args tests'early returns that could pass without exercising the constructor.
Customer Impact
having an
en-USinput layout installed.update before the next assertion. Real installed-layout integration coverage remains.
Regression?
Risk
behavior, fallback, and disposal. It does not change
FromCultureor layout activation.Test methodology
mainat8efd9a920dba90722f8db1f7e943f74837d26579.InputLanguage*selection: 34 passed, 4 failed. The four event-args casesrequired an unavailable
en-USinput language. The old supplemental installer testwas deliberately not executed because it changes the real Windows language list;
this is not a claim to have reproduced the installation timing race in Random failures in InputLanguage_FromCulture_SupplementalInputLanguages_Expected #13274.
InputLanguage*selection: 64 passed, 0 failed, 0 skipped with each of--culture pl-PLand--culture en-US, without an exclusion filter.failures; an injected setter assertion was reported with
finallybut incorrectlypassed with the old
catchpolicy. All temporary mutations were removed.Validation is targeted; the full repository test suite was not run for this PR.
Targeted invocation after building the unit-test project:
Test environment(s)
en-USinput layout.11.0.100-rc.1.26420.103; test runtime12.0.0-alpha.1.26458.117as required by main.Microsoft Reviewers: Open in CodeFlow