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

Unified Diff: services/ui/ws/window_finder_unittest.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: services/ui/ws/window_finder_unittest.cc
diff --git a/services/ui/ws/window_finder_unittest.cc b/services/ui/ws/window_finder_unittest.cc
index 3cff83771101bd142c843314ac035c85dd00088a..139dd5fd0a5dedb14f6fb99f2b9ed254eb8bbfd0 100644
--- a/services/ui/ws/window_finder_unittest.cc
+++ b/services/ui/ws/window_finder_unittest.cc
@@ -19,19 +19,19 @@ TEST(WindowFinderTest, FindDeepestVisibleWindow) {
ServerWindow root(&window_delegate, WindowId(1, 2));
window_delegate.set_root_window(&root);
root.SetVisible(true);
- root.SetBounds(gfx::Rect(0, 0, 100, 100));
+ root.SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
ServerWindow child1(&window_delegate, WindowId(1, 3));
root.Add(&child1);
EnableHitTest(&child1);
child1.SetVisible(true);
- child1.SetBounds(gfx::Rect(10, 10, 20, 20));
+ child1.SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
ServerWindow child2(&window_delegate, WindowId(1, 4));
root.Add(&child2);
EnableHitTest(&child2);
child2.SetVisible(true);
- child2.SetBounds(gfx::Rect(15, 15, 20, 20));
+ child2.SetBounds(gfx::Rect(15, 15, 20, 20), cc::LocalFrameId());
gfx::Point local_point(16, 16);
EXPECT_EQ(&child2, FindDeepestVisibleWindowForEvents(&root, &local_point));
@@ -58,13 +58,13 @@ TEST(WindowFinderTest, FindDeepestVisibleWindowHitTestMask) {
window_delegate.set_root_window(&root);
EnableHitTest(&root);
root.SetVisible(true);
- root.SetBounds(gfx::Rect(0, 0, 100, 100));
+ root.SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
ServerWindow child_with_mask(&window_delegate, WindowId(1, 4));
root.Add(&child_with_mask);
EnableHitTest(&child_with_mask);
child_with_mask.SetVisible(true);
- child_with_mask.SetBounds(gfx::Rect(10, 10, 20, 20));
+ child_with_mask.SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
child_with_mask.SetHitTestMask(gfx::Rect(2, 2, 16, 16));
// Test a point inside the window but outside the mask.
@@ -85,7 +85,7 @@ TEST(WindowFinderTest, FindDeepestVisibleWindowForEventsOverNonTarget) {
ServerWindow root(&window_delegate, WindowId(1, 2));
window_delegate.set_root_window(&root);
root.SetVisible(true);
- root.SetBounds(gfx::Rect(0, 0, 100, 100));
+ root.SetBounds(gfx::Rect(0, 0, 100, 100), cc::LocalFrameId());
// Create two windows, |child1| and |child2|. The two overlap but |child2| is
// not a valid event target.
@@ -93,12 +93,12 @@ TEST(WindowFinderTest, FindDeepestVisibleWindowForEventsOverNonTarget) {
root.Add(&child1);
EnableHitTest(&child1);
child1.SetVisible(true);
- child1.SetBounds(gfx::Rect(10, 10, 20, 20));
+ child1.SetBounds(gfx::Rect(10, 10, 20, 20), cc::LocalFrameId());
ServerWindow child2(&window_delegate, WindowId(1, 4));
root.Add(&child2);
child2.SetVisible(true);
- child2.SetBounds(gfx::Rect(15, 15, 20, 20));
+ child2.SetBounds(gfx::Rect(15, 15, 20, 20), cc::LocalFrameId());
// |location_point| is over |child2| and |child1|, but as |child2| isn't a
// valid event taret |child2| should be picked.

Powered by Google App Engine
This is Rietveld 408576698