X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fash%2Fdrag_drop%2Fdrag_drop_controller_unittest.cc;h=e08d793bd10da088ff2095309caaa169bb8a887f;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=4051cc674dbd0a720998bd5022f818abc295dce0;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ash/drag_drop/drag_drop_controller_unittest.cc b/src/ash/drag_drop/drag_drop_controller_unittest.cc index 4051cc6..e08d793 100644 --- a/src/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/src/ash/drag_drop/drag_drop_controller_unittest.cc @@ -24,6 +24,7 @@ #include "ui/events/event.h" #include "ui/events/event_utils.h" #include "ui/events/gestures/gesture_types.h" +#include "ui/events/test/events_test_utils.h" #include "ui/gfx/animation/linear_animation.h" #include "ui/gfx/image/image_skia_rep.h" #include "ui/views/test/test_views_delegate.h" @@ -148,11 +149,9 @@ class CompletableLinearAnimation : public gfx::LinearAnimation { int duration_; }; -class TestDragDropController : public internal::DragDropController { +class TestDragDropController : public DragDropController { public: - TestDragDropController() : internal::DragDropController() { - Reset(); - } + TestDragDropController() : DragDropController() { Reset(); } void Reset() { drag_start_received_ = false; @@ -284,8 +283,12 @@ void DispatchGesture(ui::EventType gesture_type, gfx::Point location) { ui::EventTimeForNow(), ui::GestureEventDetails(gesture_type, 0, 0), 1); - Shell::GetPrimaryRootWindow()->GetHost()->dispatcher()->DispatchGestureEvent( - &gesture_event); + ui::EventSource* event_source = + Shell::GetPrimaryRootWindow()->GetHost()->GetEventSource(); + ui::EventSourceTestApi event_source_test(event_source); + ui::EventDispatchDetails details = + event_source_test.SendEventToProcessor(&gesture_event); + CHECK(!details.dispatcher_destroyed); } } // namespace @@ -333,7 +336,7 @@ class DragDropControllerTest : public AshTestBase { NULL; } - internal::DragDropTracker* drag_drop_tracker() { + DragDropTracker* drag_drop_tracker() { return drag_drop_controller_->drag_drop_tracker_.get(); }