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

Side by Side Diff: components/exo/pointer_unittest.cc

Issue 1819273002: exo: Improved implementation of child surfaces and popups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix deps Created 4 years, 9 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/exo/display.cc ('k') | components/exo/shell_surface.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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "components/exo/buffer.h" 6 #include "components/exo/buffer.h"
7 #include "components/exo/pointer.h" 7 #include "components/exo/pointer.h"
8 #include "components/exo/pointer_delegate.h" 8 #include "components/exo/pointer_delegate.h"
9 #include "components/exo/shell_surface.h" 9 #include "components/exo/shell_surface.h"
10 #include "components/exo/surface.h" 10 #include "components/exo/surface.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 EXPECT_CALL(delegate, OnPointerLeave(surface.get())); 164 EXPECT_CALL(delegate, OnPointerLeave(surface.get()));
165 EXPECT_CALL(delegate, OnPointerEnter(sub_surface.get(), gfx::Point(), 0)); 165 EXPECT_CALL(delegate, OnPointerEnter(sub_surface.get(), gfx::Point(), 0));
166 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin()); 166 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin());
167 167
168 EXPECT_CALL(delegate, OnPointerMotion(testing::_, gfx::Point(1, 1))); 168 EXPECT_CALL(delegate, OnPointerMotion(testing::_, gfx::Point(1, 1)));
169 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin() + 169 generator.MoveMouseTo(sub_surface->GetBoundsInScreen().origin() +
170 gfx::Vector2d(1, 1)); 170 gfx::Vector2d(1, 1));
171 171
172 scoped_ptr<Surface> child_surface(new Surface); 172 scoped_ptr<Surface> child_surface(new Surface);
173 scoped_ptr<ShellSurface> child_shell_surface(new ShellSurface( 173 scoped_ptr<ShellSurface> child_shell_surface(new ShellSurface(
174 child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1))); 174 child_surface.get(), shell_surface.get(), gfx::Rect(9, 9, 1, 1), true));
175 gfx::Size child_buffer_size(15, 15); 175 gfx::Size child_buffer_size(15, 15);
176 scoped_ptr<Buffer> child_buffer( 176 scoped_ptr<Buffer> child_buffer(
177 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(child_buffer_size))); 177 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(child_buffer_size)));
178 child_surface->Attach(child_buffer.get()); 178 child_surface->Attach(child_buffer.get());
179 child_surface->Commit(); 179 child_surface->Commit();
180 180
181 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(child_surface.get())) 181 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(child_surface.get()))
182 .WillRepeatedly(testing::Return(true)); 182 .WillRepeatedly(testing::Return(true));
183 183
184 EXPECT_CALL(delegate, OnPointerLeave(sub_surface.get())); 184 EXPECT_CALL(delegate, OnPointerLeave(sub_surface.get()));
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 EXPECT_CALL(delegate, 282 EXPECT_CALL(delegate,
283 OnPointerScroll(testing::_, gfx::Vector2dF(1, 1), true)); 283 OnPointerScroll(testing::_, gfx::Vector2dF(1, 1), true));
284 generator.MoveMouseWheel(1, 1); 284 generator.MoveMouseWheel(1, 1);
285 285
286 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get())); 286 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get()));
287 pointer.reset(); 287 pointer.reset();
288 } 288 }
289 289
290 } // namespace 290 } // namespace
291 } // namespace exo 291 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/display.cc ('k') | components/exo/shell_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698