Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / ui / views / widget / widget_interactive_uitest.cc
index 3fd2509..ddc6e65 100644 (file)
@@ -134,9 +134,6 @@ class NestedLoopCaptureView : public View {
     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;
   }
@@ -148,8 +145,8 @@ class NestedLoopCaptureView : public View {
 
 }  // 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.
@@ -780,8 +777,9 @@ TEST_F(WidgetCaptureTest, MAYBE_MouseEventDispatchedToRightWindow) {
   // |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());
 }