Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 5 additions & 13 deletions tests/UI/Logic/AccessibleNamesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,22 +104,14 @@
}

/// <summary>
/// Runs pending dispatcher jobs, ignoring what they throw. Some view models probe media
/// on a background thread from Loaded and post a message box back (Video OCR: "unable
/// to read video"); when that post lands after the window is closed, showing the box
/// throws "Cannot show a window with a closed owner" - a timing artifact of opening
/// windows without files, not an accessibility finding.
/// Runs pending dispatcher jobs. Unexpected dispatcher failures must fail the test;
/// the Video OCR closed-owner race that previously required suppression is now fixed
/// at the source by checking whether its window is already closing before showing the
/// message box (upstream 6840e797).
/// </summary>
private static void DrainJobs()
{
try
{
Dispatcher.UIThread.RunJobs();
}
catch (Exception)
{
// Ignored - see summary.
}
Dispatcher.UIThread.RunJobs();
}

private static string Describe(Control control)
Expand All @@ -130,9 +122,9 @@
parts.Add($"name={control.Name}");
}

if (control is TextBox textBox && !string.IsNullOrEmpty(textBox.Watermark))

Check warning on line 125 in tests/UI/Logic/AccessibleNamesTests.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'
{
parts.Add($"watermark={textBox.Watermark}");

Check warning on line 127 in tests/UI/Logic/AccessibleNamesTests.cs

View workflow job for this annotation

GitHub Actions / test

'TextBox.Watermark' is obsolete: 'Use PlaceholderText instead.'
}

var parent = control.Parent;
Expand Down
Loading