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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 1901773002: Removes most of aura dependencies from DefaultState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wm_window_positioner
Patch Set: nit and merge Created 4 years, 8 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
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index a755e3b56a9c6b7aeb4b2e6a520f6852003da547..00625c5b6bce51f238364a5542f7eb122d61e352 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -23,6 +23,7 @@
#include "ash/test/test_shell_delegate.h"
#include "ash/test/test_volume_control_delegate.h"
#include "ash/volume_control_delegate.h"
+#include "ash/wm/common/window_positioning_utils.h"
#include "ash/wm/common/wm_event.h"
#include "ash/wm/lock_state_controller.h"
#include "ash/wm/panels/panel_layout_manager.h"
@@ -450,13 +451,13 @@ TEST_F(AcceleratorControllerTest, WindowSnap) {
{
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
- window.get());
+ wm::WmWindowAura::Get(window.get()));
EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
}
{
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent(
- window.get());
+ wm::WmWindowAura::Get(window.get()));
EXPECT_EQ(expected_bounds.ToString(), window->bounds().ToString());
}
{
@@ -505,7 +506,7 @@ TEST_F(AcceleratorControllerTest, WindowSnapLeftDockLeftRestore) {
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
gfx::Rect normal_bounds = window1_state->GetRestoreBoundsInParent();
gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
- window1.get());
+ wm::WmWindowAura::Get(window1.get()));
EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
EXPECT_TRUE(window1_state->IsSnapped());
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
@@ -527,8 +528,8 @@ TEST_F(AcceleratorControllerTest, WindowSnapRightDockRightRestore) {
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
gfx::Rect normal_bounds = window1_state->GetRestoreBoundsInParent();
- gfx::Rect expected_bounds =
- wm::GetDefaultRightSnappedWindowBoundsInParent(window1.get());
+ gfx::Rect expected_bounds = wm::GetDefaultRightSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window1.get()));
EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
EXPECT_TRUE(window1_state->IsSnapped());
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_RIGHT);
@@ -549,10 +550,10 @@ TEST_F(AcceleratorControllerTest, WindowSnapLeftDockLeftSnapRight) {
window1_state->Activate();
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
- gfx::Rect expected_bounds =
- wm::GetDefaultLeftSnappedWindowBoundsInParent(window1.get());
- gfx::Rect expected_bounds2 =
- wm::GetDefaultRightSnappedWindowBoundsInParent(window1.get());
+ gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window1.get()));
+ gfx::Rect expected_bounds2 = wm::GetDefaultRightSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window1.get()));
EXPECT_EQ(expected_bounds.ToString(), window1->bounds().ToString());
EXPECT_TRUE(window1_state->IsSnapped());
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
@@ -621,8 +622,8 @@ TEST_F(AcceleratorControllerTest, WindowPanelDockLeftDockRightRestore) {
gfx::Rect window_restore_bounds2 = window->bounds();
GetController()->PerformActionIfEnabled(WINDOW_CYCLE_SNAP_DOCK_LEFT);
- gfx::Rect expected_bounds =
- wm::GetDefaultLeftSnappedWindowBoundsInParent(window.get());
+ gfx::Rect expected_bounds = wm::GetDefaultLeftSnappedWindowBoundsInParent(
+ wm::WmWindowAura::Get(window.get()));
gfx::Rect window_restore_bounds =
window_state->GetRestoreBoundsInScreen();
EXPECT_NE(expected_bounds.ToString(), window->bounds().ToString());
« no previous file with comments | « no previous file | ash/ash.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698