| 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 "ui/touch_selection/touch_selection_controller.h" | 5 #include "ui/touch_selection/touch_selection_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/macros.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/events/test/motion_event_test_utils.h" | 12 #include "ui/events/test/motion_event_test_utils.h" |
| 12 #include "ui/touch_selection/touch_selection_controller_test_api.h" | 13 #include "ui/touch_selection/touch_selection_controller_test_api.h" |
| 13 | 14 |
| 14 using testing::ElementsAre; | 15 using testing::ElementsAre; |
| 15 using testing::IsEmpty; | 16 using testing::IsEmpty; |
| 16 using ui::test::MockMotionEvent; | 17 using ui::test::MockMotionEvent; |
| 17 | 18 |
| 18 namespace ui { | 19 namespace ui { |
| (...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1433 offset_rect.x(), offset_rect.bottom()); | 1434 offset_rect.x(), offset_rect.bottom()); |
| 1434 EXPECT_TRUE(controller().WillHandleTouchEvent(event)); | 1435 EXPECT_TRUE(controller().WillHandleTouchEvent(event)); |
| 1435 EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STOPPED)); | 1436 EXPECT_THAT(GetAndResetEvents(), ElementsAre(SELECTION_HANDLE_DRAG_STOPPED)); |
| 1436 EXPECT_EQ(test_controller.GetStartHandleOrientation(), | 1437 EXPECT_EQ(test_controller.GetStartHandleOrientation(), |
| 1437 TouchHandleOrientation::LEFT); | 1438 TouchHandleOrientation::LEFT); |
| 1438 EXPECT_EQ(test_controller.GetEndHandleOrientation(), | 1439 EXPECT_EQ(test_controller.GetEndHandleOrientation(), |
| 1439 TouchHandleOrientation::RIGHT); | 1440 TouchHandleOrientation::RIGHT); |
| 1440 } | 1441 } |
| 1441 | 1442 |
| 1442 } // namespace ui | 1443 } // namespace ui |
| OLD | NEW |