| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |