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

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

Issue 2629643002: chromeos: Renames WmWindowAura to WmWindow (Closed)
Patch Set: feedback 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 unified diff | Download patch
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"
6 #include "ash/common/wm/window_positioning_utils.h" 5 #include "ash/common/wm/window_positioning_utils.h"
7 #include "ash/common/wm_shell.h" 6 #include "ash/common/wm_shell.h"
7 #include "ash/common/wm_window.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"
11 #include "components/exo/pointer.h" 11 #include "components/exo/pointer.h"
12 #include "components/exo/pointer_delegate.h" 12 #include "components/exo/pointer_delegate.h"
13 #include "components/exo/shell_surface.h" 13 #include "components/exo/shell_surface.h"
14 #include "components/exo/surface.h" 14 #include "components/exo/surface.h"
15 #include "components/exo/test/exo_test_base.h" 15 #include "components/exo/test/exo_test_base.h"
16 #include "components/exo/test/exo_test_helper.h" 16 #include "components/exo/test/exo_test_helper.h"
17 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 307
308 // Create surface for modal window. 308 // Create surface for modal window.
309 std::unique_ptr<Surface> surface2(new Surface); 309 std::unique_ptr<Surface> surface2(new Surface);
310 std::unique_ptr<ShellSurface> shell_surface2( 310 std::unique_ptr<ShellSurface> shell_surface2(
311 new ShellSurface(surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5), true, 311 new ShellSurface(surface2.get(), nullptr, gfx::Rect(0, 0, 5, 5), true,
312 false, ash::kShellWindowId_SystemModalContainer)); 312 false, ash::kShellWindowId_SystemModalContainer));
313 std::unique_ptr<Buffer> buffer2( 313 std::unique_ptr<Buffer> buffer2(
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::WmWindow::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, OnPointerFrame()).Times(testing::AnyNumber());
325 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface.get())) 325 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface.get()))
326 .WillRepeatedly(testing::Return(true)); 326 .WillRepeatedly(testing::Return(true));
327 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface2.get())) 327 EXPECT_CALL(delegate, CanAcceptPointerEventsForSurface(surface2.get()))
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 EXPECT_CALL(delegate, OnPointerLeave(surface.get())); 446 EXPECT_CALL(delegate, OnPointerLeave(surface.get()));
447 } 447 }
448 generator.MoveMouseTo(surface->window()->GetBoundsInScreen().bottom_right()); 448 generator.MoveMouseTo(surface->window()->GetBoundsInScreen().bottom_right());
449 449
450 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get())); 450 EXPECT_CALL(delegate, OnPointerDestroying(pointer.get()));
451 pointer.reset(); 451 pointer.reset();
452 } 452 }
453 453
454 } // namespace 454 } // namespace
455 } // namespace exo 455 } // namespace exo
OLDNEW
« no previous file with comments | « chrome/browser/ui/window_sizer/window_sizer_ash_uitest.cc ('k') | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698