Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Side by Side Diff: components/mus/ws/window_finder_unittest.cc

Issue 1987133002: Delete mus surfaces hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix unittests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/ws/window_finder.cc ('k') | components/mus/ws/window_manager_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/mus/ws/window_finder.h" 5 #include "components/mus/ws/window_finder.h"
6 6
7 #include "components/mus/ws/server_window.h" 7 #include "components/mus/ws/server_window.h"
8 #include "components/mus/ws/server_window_surface_manager.h" 8 #include "components/mus/ws/server_window_surface_manager.h"
9 #include "components/mus/ws/server_window_surface_manager_test_api.h" 9 #include "components/mus/ws/server_window_surface_manager_test_api.h"
10 #include "components/mus/ws/test_server_window_delegate.h" 10 #include "components/mus/ws/test_server_window_delegate.h"
(...skipping 16 matching lines...) Expand all
27 child1.SetVisible(true); 27 child1.SetVisible(true);
28 child1.SetBounds(gfx::Rect(10, 10, 20, 20)); 28 child1.SetBounds(gfx::Rect(10, 10, 20, 20));
29 29
30 ServerWindow child2(&window_delegate, WindowId(1, 4)); 30 ServerWindow child2(&window_delegate, WindowId(1, 4));
31 root.Add(&child2); 31 root.Add(&child2);
32 EnableHitTest(&child2); 32 EnableHitTest(&child2);
33 child2.SetVisible(true); 33 child2.SetVisible(true);
34 child2.SetBounds(gfx::Rect(15, 15, 20, 20)); 34 child2.SetBounds(gfx::Rect(15, 15, 20, 20));
35 35
36 gfx::Point local_point(16, 16); 36 gfx::Point local_point(16, 16);
37 EXPECT_EQ(&child2, FindDeepestVisibleWindowForEvents(&root, cc::SurfaceId(), 37 EXPECT_EQ(&child2, FindDeepestVisibleWindowForEvents(&root, &local_point));
38 &local_point));
39 EXPECT_EQ(gfx::Point(1, 1), local_point); 38 EXPECT_EQ(gfx::Point(1, 1), local_point);
40 39
41 local_point.SetPoint(13, 14); 40 local_point.SetPoint(13, 14);
42 EXPECT_EQ(&child1, FindDeepestVisibleWindowForEvents(&root, cc::SurfaceId(), 41 EXPECT_EQ(&child1, FindDeepestVisibleWindowForEvents(&root, &local_point));
43 &local_point));
44 EXPECT_EQ(gfx::Point(3, 4), local_point); 42 EXPECT_EQ(gfx::Point(3, 4), local_point);
45 43
46 child2.set_extended_hit_test_region(gfx::Insets(10, 10, 10, 10)); 44 child2.set_extended_hit_test_region(gfx::Insets(10, 10, 10, 10));
47 local_point.SetPoint(13, 14); 45 local_point.SetPoint(13, 14);
48 EXPECT_EQ(&child2, FindDeepestVisibleWindowForEvents(&root, cc::SurfaceId(), 46 EXPECT_EQ(&child2, FindDeepestVisibleWindowForEvents(&root, &local_point));
49 &local_point));
50 EXPECT_EQ(gfx::Point(-2, -1), local_point); 47 EXPECT_EQ(gfx::Point(-2, -1), local_point);
51 } 48 }
52 49
53 } // namespace ws 50 } // namespace ws
54 } // namespace mus 51 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/window_finder.cc ('k') | components/mus/ws/window_manager_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698