| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 "ash/common/drag_drop/drag_image_view.h" | 5 #include "ash/drag_drop/drag_image_view.h" |
| 6 | 6 |
| 7 #include "ash/common/test/ash_test.h" | 7 #include "ash/test/ash_test.h" |
| 8 #include "ui/base/dragdrop/drag_drop_types.h" | 8 #include "ui/base/dragdrop/drag_drop_types.h" |
| 9 | 9 |
| 10 namespace ash { | 10 namespace ash { |
| 11 namespace test { | 11 namespace test { |
| 12 | 12 |
| 13 using DragDropImageTest = AshTest; | 13 using DragDropImageTest = AshTest; |
| 14 | 14 |
| 15 TEST_F(DragDropImageTest, SetBoundsConsidersDragHintForTouch) { | 15 TEST_F(DragDropImageTest, SetBoundsConsidersDragHintForTouch) { |
| 16 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow()); | 16 std::unique_ptr<WindowOwner> window_owner(CreateTestWindow()); |
| 17 DragImageView drag_image_view( | 17 DragImageView drag_image_view( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 drag_image_view.SetBoundsInScreen(large_bounds); | 68 drag_image_view.SetBoundsInScreen(large_bounds); |
| 69 EXPECT_EQ(large_bounds, drag_image_view.GetBoundsInScreen()); | 69 EXPECT_EQ(large_bounds, drag_image_view.GetBoundsInScreen()); |
| 70 // Expect that we can change the position without affecting the bounds. | 70 // Expect that we can change the position without affecting the bounds. |
| 71 drag_image_view.SetScreenPosition(new_pos); | 71 drag_image_view.SetScreenPosition(new_pos); |
| 72 EXPECT_EQ(gfx::Rect(new_pos, large_bounds.size()), | 72 EXPECT_EQ(gfx::Rect(new_pos, large_bounds.size()), |
| 73 drag_image_view.GetBoundsInScreen()); | 73 drag_image_view.GetBoundsInScreen()); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace test | 76 } // namespace test |
| 77 } // namespace ash | 77 } // namespace ash |
| OLD | NEW |