base::MessageLoop::ScopedNestableTaskAllower allow(loop);
base::RunLoop run_loop;
-#if defined(USE_AURA)
- run_loop.set_dispatcher(aura::Env::GetInstance()->GetDispatcher());
-#endif
run_loop.Run();
return true;
}
} // namespace
-#if defined(OS_WIN) && defined(USE_AURA)
-// Tests whether activation and focus change works correctly in Windows AURA.
+#if defined(OS_WIN)
+// Tests whether activation and focus change works correctly in Windows.
// We test the following:-
// 1. If the active aura window is correctly set when a top level widget is
// created.
// |widget2| has capture, |widget1| should still get the event.
ui::MouseEvent mouse_event(ui::ET_MOUSE_EXITED, gfx::Point(), gfx::Point(),
ui::EF_NONE, ui::EF_NONE);
- widget1.GetNativeWindow()->GetDispatcher()->AsWindowTreeHostDelegate()->
- OnHostMouseEvent(&mouse_event);
+ ui::EventDispatchDetails details = widget1.GetNativeWindow()->
+ GetDispatcher()->OnEventFromSource(&mouse_event);
+ ASSERT_FALSE(details.dispatcher_destroyed);
EXPECT_TRUE(widget1.GetAndClearGotMouseEvent());
EXPECT_FALSE(widget2.GetAndClearGotMouseEvent());
}