OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <map> | 5 #include <map> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 // Include views_test_base.h first because the definition of None in X.h | 8 // Include views_test_base.h first because the definition of None in X.h |
9 // conflicts with the definition of None in gtest-type-util.h | 9 // conflicts with the definition of None in gtest-type-util.h |
10 #include "ui/views/test/views_test_base.h" | 10 #include "ui/views/test/views_test_base.h" |
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 ++num_updates_; | 789 ++num_updates_; |
790 last_event_mouse_position_ = event.location(); | 790 last_event_mouse_position_ = event.location(); |
791 last_event_flags_ = event.flags(); | 791 last_event_flags_ = event.flags(); |
792 return ui::DragDropTypes::DRAG_COPY; | 792 return ui::DragDropTypes::DRAG_COPY; |
793 } | 793 } |
794 | 794 |
795 void OnDragExited() override { | 795 void OnDragExited() override { |
796 ++num_exits_; | 796 ++num_exits_; |
797 } | 797 } |
798 | 798 |
799 virtual int OnPerformDrop(const ui::DropTargetEvent& event) override { | 799 int OnPerformDrop(const ui::DropTargetEvent& event) override { |
800 ++num_drops_; | 800 ++num_drops_; |
801 last_event_mouse_position_ = event.location(); | 801 last_event_mouse_position_ = event.location(); |
802 last_event_flags_ = event.flags(); | 802 last_event_flags_ = event.flags(); |
803 return ui::DragDropTypes::DRAG_COPY; | 803 return ui::DragDropTypes::DRAG_COPY; |
804 } | 804 } |
805 | 805 |
806 int num_enters_; | 806 int num_enters_; |
807 int num_updates_; | 807 int num_updates_; |
808 int num_exits_; | 808 int num_exits_; |
809 int num_drops_; | 809 int num_drops_; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 // the aura::client::DragDropDelegate is properly notified. | 958 // the aura::client::DragDropDelegate is properly notified. |
959 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) { | 959 TEST_F(DesktopDragDropClientAuraX11ChromeSourceTargetTest, CtrlPressed) { |
960 base::MessageLoop::current()->PostTask( | 960 base::MessageLoop::current()->PostTask( |
961 FROM_HERE, | 961 FROM_HERE, |
962 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN)); | 962 base::Bind(&ChromeSourceTargetStep2, client(), ui::EF_CONTROL_DOWN)); |
963 int result = StartDragAndDrop(); | 963 int result = StartDragAndDrop(); |
964 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result); | 964 EXPECT_EQ(ui::DragDropTypes::DRAG_COPY, result); |
965 } | 965 } |
966 | 966 |
967 } // namespace views | 967 } // namespace views |
OLD | NEW |