OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "services/ui/ws/window_finder.h" | 5 #include "services/ui/ws/window_finder.h" |
6 | 6 |
7 #include "services/ui/ws/server_window.h" | 7 #include "services/ui/ws/server_window.h" |
8 #include "services/ui/ws/server_window_surface_manager.h" | 8 #include "services/ui/ws/server_window_compositor_frame_sink_manager.h" |
9 #include "services/ui/ws/server_window_surface_manager_test_api.h" | 9 #include "services/ui/ws/server_window_compositor_frame_sink_manager_test_api.h" |
10 #include "services/ui/ws/test_server_window_delegate.h" | 10 #include "services/ui/ws/test_server_window_delegate.h" |
11 #include "services/ui/ws/window_finder.h" | 11 #include "services/ui/ws/window_finder.h" |
12 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 namespace ws { | 15 namespace ws { |
16 | 16 |
17 TEST(WindowFinderTest, FindDeepestVisibleWindow) { | 17 TEST(WindowFinderTest, FindDeepestVisibleWindow) { |
18 TestServerWindowDelegate window_delegate; | 18 TestServerWindowDelegate window_delegate; |
19 ServerWindow root(&window_delegate, WindowId(1, 2)); | 19 ServerWindow root(&window_delegate, WindowId(1, 2)); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 // Test a point inside the window and inside the mask. | 76 // Test a point inside the window and inside the mask. |
77 gfx::Point point_inside_mask(15, 15); | 77 gfx::Point point_inside_mask(15, 15); |
78 EXPECT_EQ(&child_with_mask, | 78 EXPECT_EQ(&child_with_mask, |
79 FindDeepestVisibleWindowForEvents(&root, &point_inside_mask)); | 79 FindDeepestVisibleWindowForEvents(&root, &point_inside_mask)); |
80 EXPECT_EQ(gfx::Point(5, 5), point_inside_mask); | 80 EXPECT_EQ(gfx::Point(5, 5), point_inside_mask); |
81 } | 81 } |
82 | 82 |
83 } // namespace ws | 83 } // namespace ws |
84 } // namespace ui | 84 } // namespace ui |
OLD | NEW |