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

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

Issue 2562803002: exo: Replace pointer based stylus and replace with touch based stylus (Closed)
Patch Set: updated deps in gn file Created 4 years 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/pointer.cc ('k') | components/exo/test/exo_test_helper.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/aura/wm_window_aura.h" 5 #include "ash/aura/wm_window_aura.h"
6 #include "ash/common/wm/window_positioning_utils.h" 6 #include "ash/common/wm/window_positioning_utils.h"
7 #include "ash/common/wm_shell.h" 7 #include "ash/common/wm_shell.h"
8 #include "ash/public/cpp/shell_window_ids.h" 8 #include "ash/public/cpp/shell_window_ids.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "components/exo/buffer.h" 10 #include "components/exo/buffer.h"
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(5, 5)))); 314 new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(gfx::Size(5, 5))));
315 surface2->Attach(buffer2.get()); 315 surface2->Attach(buffer2.get());
316 surface2->Commit(); 316 surface2->Commit();
317 ash::wm::CenterWindow(ash::WmWindowAura::Get(surface2->window())); 317 ash::wm::CenterWindow(ash::WmWindowAura::Get(surface2->window()));
318 gfx::Point location2 = surface2->window()->GetBoundsInScreen().origin(); 318 gfx::Point location2 = surface2->window()->GetBoundsInScreen().origin();
319 319
320 // Make the window modal. 320 // Make the window modal.
321 shell_surface2->SetSystemModal(true); 321 shell_surface2->SetSystemModal(true);
322 EXPECT_TRUE(ash::WmShell::Get()->IsSystemModalWindowOpen()); 322 EXPECT_TRUE(ash::WmShell::Get()->IsSystemModalWindowOpen());
323 323
324 EXPECT_CALL(delegate, OnPointerFrame()).Times(testing::AnyNumber());
324 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface.get())) 325 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface.get()))
325 .WillRepeatedly(testing::Return(true)); 326 .WillRepeatedly(testing::Return(true));
326 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface2.get())) 327 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface2.get()))
327 .WillRepeatedly(testing::Return(true)); 328 .WillRepeatedly(testing::Return(true));
328 329
329 // Check if pointer events on modal window are registered. 330 // Check if pointer events on modal window are registered.
330 { 331 {
331 testing::InSequence sequence; 332 testing::InSequence sequence;
332 EXPECT_CALL(delegate, OnPointerEnter(surface2.get(), gfx::PointF(), 0)); 333 EXPECT_CALL(delegate, OnPointerEnter(surface2.get(), gfx::PointF(), 0));
333 } 334 }
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 EXPECT_CALL(delegate, OnPointerLeave(surface.get())); 446 EXPECT_CALL(delegate, OnPointerLeave(surface.get()));
446 } 447 }
447 generator.MoveMouseTo(surface->window()->GetBoundsInScreen().bottom_right()); 448 generator.MoveMouseTo(surface->window()->GetBoundsInScreen().bottom_right());
448 449
449 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get())); 450 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get()));
450 pointer.reset(); 451 pointer.reset();
451 } 452 }
452 453
453 } // namespace 454 } // namespace
454 } // namespace exo 455 } // namespace exo
OLDNEW
« no previous file with comments | « components/exo/pointer.cc ('k') | components/exo/test/exo_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698