KeyboardController causes infinite loop with hidden tests
Brought to you by:
charliepoole,
lukemaxon
OS Configuration: Windows XP Pro SP2 with .NET 2.0
NUnitForms Version: .NET 2.0 alpha 5 release
Use of KeyboardController.Click() in conjunction with
NUnitTestForm.UseHidden=true results in an infinite loop.
KeyboardController now uses System.Windows.Forms
.SendKeys.SentWait() to deliver keystroke events to the
test form. When NUnitTestForm.UseHidden=true, the test
framework creates a hidden Desktop which seems to
prevent the SendKeys.event queue from emptying.
SendKeys.Flush() loops until the SendKeys.event queue
has no more events to process, calling
System.Windows.Forms.Application.doEvents() on each
loop. However, events are never processed when the
hidden desktop is used and the loop never terminates.