Hi Stephan, On Thu, Mar 26, 2020 at 11:07:51AM +0100, Stephan Bergmann <sbergman@redhat.com> wrote:
The question is how UITests should avoid such deadlocks. The behavior of ErrorHandler::HandleError (vcl/source/window/errinf.cxx) can be modified via ErrorRegistry::RegisterDisplay (vcl/source/window/errinf.cxx), to call a user-provided BasicDisplayErrorFunc instead of showing a VCL error dialog. But: * There appears to be no UNO API to call ErrorRegistry::RegisterDisplay remotely from the UITest's Python code. * There appears to be no way to only temporarily set ErrorRegistry::RegisterDisplay and then undo it again. So it would be problematic for a UITest to do some tests (which explicitly want to test interaction with a VCL error dialog, say) without a set ErrorRegistry::RegisterDisplay, while doing all the its other tests with a set ErrorRegistry::RegisterDisplay (so as to avoid deadlocks caused by unexpected errors raising unexpected VCL error dialogs).
What if we add a new optional bool property to VCLXToolkit to fail early without invoking the handler registered via ErrorRegistry::RegisterDisplay()? The uitest setup code would enable that by default, but a specific test could still disable it if wanted. Regards, Miklos
Attachment:
signature.asc
Description: Digital signature