I'm adding a widget_unittest test in http://crrev.com/c/851752 to test lifetime around event monitors.
It closes a widget inside ui::EventHandler hooked up via SetCapture on the same widget.
Mus behaves differently to all other platforms, and triggers
[ RUN ] WidgetTest.DestroyedWithCaptureViaEventMonitor
[31552:31552:0105/023054.639439:21913842587:FATAL:event_generator.cc(737)] Check failed: !details.dispatcher_destroyed.
#0 0x0000008fddcc base::debug::StackTrace::StackTrace()
#1 0x0000008a7c8c logging::LogMessage::~LogMessage()
#2 0x000000da20e4 ui::test::EventGenerator::DoDispatchEvent()
#3 0x000000da06ed ui::test::EventGenerator::PressButton()
#4 0x000000647458 views::test::WidgetTest_DestroyedWithCaptureViaEventMonitor_Test::TestBody()
This might be a bug, or it could be that some of the assumptions that the event generator is making do not hold under Mus.
The lifetime issues I'm fixing are mac-specific, and the patch is already large, so I'll disable on mus for now.
Comment 1 by lafo...@chromium.org
, Feb 26 2018