Index: ash/wm/workspace/workspace_window_resizer_unittest.cc |
diff --git a/ash/wm/workspace/workspace_window_resizer_unittest.cc b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
index ea8d4bb4f6dc536f30194df306ff3c05a3edbf06..94a0b3f090135df68b6fc809e395aade3bed7d5d 100644 |
--- a/ash/wm/workspace/workspace_window_resizer_unittest.cc |
+++ b/ash/wm/workspace/workspace_window_resizer_unittest.cc |
@@ -16,7 +16,7 @@ |
#include "ash/public/cpp/shell_window_ids.h" |
#include "ash/screen_util.h" |
#include "ash/shell.h" |
-#include "ash/test/ash_md_test_base.h" |
+#include "ash/test/ash_test_base.h" |
#include "ash/wm/window_state_aura.h" |
#include "ash/wm/window_util.h" |
#include "base/command_line.h" |
@@ -65,13 +65,13 @@ class TestWindowDelegate : public aura::test::TestWindowDelegate { |
} // namespace |
-class WorkspaceWindowResizerTest : public test::AshMDTestBase { |
+class WorkspaceWindowResizerTest : public test::AshTestBase { |
public: |
WorkspaceWindowResizerTest() : workspace_resizer_(nullptr) {} |
~WorkspaceWindowResizerTest() override {} |
void SetUp() override { |
- AshMDTestBase::SetUp(); |
+ AshTestBase::SetUp(); |
UpdateDisplay(base::StringPrintf("800x%d", kRootHeight)); |
// Ignore the touch slop region. |
ui::GestureConfiguration::GetInstance() |
@@ -112,7 +112,7 @@ class WorkspaceWindowResizerTest : public test::AshMDTestBase { |
window3_.reset(); |
window4_.reset(); |
touch_resize_window_.reset(); |
- AshMDTestBase::TearDown(); |
+ AshTestBase::TearDown(); |
} |
// Returns a string identifying the z-order of each of the known child windows |
@@ -196,16 +196,9 @@ class WorkspaceWindowResizerTest : public test::AshMDTestBase { |
DISALLOW_COPY_AND_ASSIGN(WorkspaceWindowResizerTest); |
}; |
-INSTANTIATE_TEST_CASE_P( |
- /* prefix intentionally left blank due to only one parameterization */, |
- WorkspaceWindowResizerTest, |
- testing::Values(MaterialDesignController::NON_MATERIAL, |
- MaterialDesignController::MATERIAL_NORMAL, |
- MaterialDesignController::MATERIAL_EXPERIMENTAL)); |
- |
// Assertions around attached window resize dragging from the right with 2 |
// windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) { |
window_->SetBounds(gfx::Rect(0, 300, 400, 300)); |
window2_->SetBounds(gfx::Rect(400, 200, 100, 200)); |
@@ -239,7 +232,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_2) { |
} |
// Assertions around collapsing and expanding. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_Compress) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_Compress) { |
window_->SetBounds(gfx::Rect(0, 300, 400, 300)); |
window2_->SetBounds(gfx::Rect(400, 200, 100, 200)); |
@@ -278,7 +271,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_Compress) { |
// Assertions around attached window resize dragging from the right with 3 |
// windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3) { |
window_->SetBounds(gfx::Rect(100, 300, 200, 300)); |
window2_->SetBounds(gfx::Rect(300, 300, 150, 200)); |
window3_->SetBounds(gfx::Rect(450, 300, 100, 200)); |
@@ -319,7 +312,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3) { |
// Assertions around attached window resizing (collapsing and expanding) with |
// 3 windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3_Compress) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3_Compress) { |
window_->SetBounds(gfx::Rect(100, 300, 200, 300)); |
window2_->SetBounds(gfx::Rect(300, 300, 200, 200)); |
window3_->SetBounds(gfx::Rect(450, 300, 100, 200)); |
@@ -353,7 +346,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_RIGHT_3_Compress) { |
} |
// Assertions around collapsing and expanding from the bottom. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_Compress) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_Compress) { |
window_->SetBounds(gfx::Rect(0, 100, 400, 300)); |
window2_->SetBounds(gfx::Rect(400, 400, 100, 200)); |
@@ -387,7 +380,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_Compress) { |
// Assertions around attached window resize dragging from the bottom with 2 |
// windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) { |
window_->SetBounds(gfx::Rect(0, 50, 400, 200)); |
window2_->SetBounds(gfx::Rect(0, 250, 200, 100)); |
@@ -422,7 +415,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_2) { |
// Assertions around attached window resize dragging from the bottom with 3 |
// windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -467,7 +460,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3) { |
// Assertions around attached window resizing (collapsing and expanding) with |
// 3 windows. |
-TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) { |
+TEST_F(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) { |
window_->SetBounds(gfx::Rect(0, 0, 200, 200)); |
window2_->SetBounds(gfx::Rect(10, 200, 200, 200)); |
window3_->SetBounds(gfx::Rect(20, 400, 100, 100)); |
@@ -502,7 +495,7 @@ TEST_P(WorkspaceWindowResizerTest, AttachedResize_BOTTOM_3_Compress) { |
// Tests that touch-dragging a window does not lock the mouse cursor |
// and therefore shows the cursor on a mousemove. |
-TEST_P(WorkspaceWindowResizerTest, MouseMoveWithTouchDrag) { |
+TEST_F(WorkspaceWindowResizerTest, MouseMoveWithTouchDrag) { |
window_->SetBounds(gfx::Rect(0, 300, 400, 300)); |
window2_->SetBounds(gfx::Rect(400, 200, 100, 200)); |
@@ -539,7 +532,7 @@ TEST_P(WorkspaceWindowResizerTest, MouseMoveWithTouchDrag) { |
} |
// Assertions around dragging to the left/right edge of the screen. |
-TEST_P(WorkspaceWindowResizerTest, Edge) { |
+TEST_F(WorkspaceWindowResizerTest, Edge) { |
// Resize host window to force insets update. |
UpdateDisplay("800x700"); |
// TODO(varkha): Insets are reset after every drag because of |
@@ -618,7 +611,7 @@ TEST_P(WorkspaceWindowResizerTest, Edge) { |
} |
// Check that non resizable windows will not get resized. |
-TEST_P(WorkspaceWindowResizerTest, NonResizableWindows) { |
+TEST_F(WorkspaceWindowResizerTest, NonResizableWindows) { |
window_->SetBounds(gfx::Rect(20, 30, 50, 60)); |
window_->SetProperty(aura::client::kResizeBehaviorKey, |
ui::mojom::kResizeBehaviorNone); |
@@ -631,7 +624,7 @@ TEST_P(WorkspaceWindowResizerTest, NonResizableWindows) { |
EXPECT_EQ("0,30 50x60", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, CancelSnapPhantom) { |
+TEST_F(WorkspaceWindowResizerTest, CancelSnapPhantom) { |
UpdateDisplay("800x600,800x600"); |
aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
ASSERT_EQ(2U, root_windows.size()); |
@@ -664,7 +657,7 @@ TEST_P(WorkspaceWindowResizerTest, CancelSnapPhantom) { |
} |
// Verifies that dragging a snapped window unsnaps it. |
-TEST_P(WorkspaceWindowResizerTest, DragSnapped) { |
+TEST_F(WorkspaceWindowResizerTest, DragSnapped) { |
wm::WindowState* window_state = ash::wm::GetWindowState(window_.get()); |
const gfx::Rect kInitialBounds(100, 100, 100, 100); |
@@ -689,7 +682,7 @@ TEST_P(WorkspaceWindowResizerTest, DragSnapped) { |
} |
// Verifies the behavior of resizing a side snapped window. |
-TEST_P(WorkspaceWindowResizerTest, ResizeSnapped) { |
+TEST_F(WorkspaceWindowResizerTest, ResizeSnapped) { |
wm::WindowState* window_state = ash::wm::GetWindowState(window_.get()); |
const gfx::Rect kInitialBounds(100, 100, 100, 100); |
@@ -748,7 +741,7 @@ TEST_P(WorkspaceWindowResizerTest, ResizeSnapped) { |
} |
// Verifies windows are correctly restacked when reordering multiple windows. |
-TEST_P(WorkspaceWindowResizerTest, RestackAttached) { |
+TEST_F(WorkspaceWindowResizerTest, RestackAttached) { |
window_->SetBounds(gfx::Rect(0, 0, 200, 300)); |
window2_->SetBounds(gfx::Rect(200, 0, 100, 200)); |
window3_->SetBounds(gfx::Rect(300, 0, 100, 100)); |
@@ -785,7 +778,7 @@ TEST_P(WorkspaceWindowResizerTest, RestackAttached) { |
} |
// Makes sure we don't allow dragging below the work area. |
-TEST_P(WorkspaceWindowResizerTest, DontDragOffBottom) { |
+TEST_F(WorkspaceWindowResizerTest, DontDragOffBottom) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(0, 0, 10, 0)); |
@@ -803,7 +796,7 @@ TEST_P(WorkspaceWindowResizerTest, DontDragOffBottom) { |
} |
// Makes sure we don't allow dragging on the work area with multidisplay. |
-TEST_P(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) { |
+TEST_F(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) { |
UpdateDisplay("800x600,800x600"); |
ASSERT_EQ(2, display::Screen::GetScreen()->GetNumDisplays()); |
@@ -867,7 +860,7 @@ TEST_P(WorkspaceWindowResizerTest, DontDragOffBottomWithMultiDisplay) { |
} |
// Makes sure we don't allow dragging off the top of the work area. |
-TEST_P(WorkspaceWindowResizerTest, DontDragOffTop) { |
+TEST_F(WorkspaceWindowResizerTest, DontDragOffTop) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(10, 0, 0, 0)); |
@@ -879,7 +872,7 @@ TEST_P(WorkspaceWindowResizerTest, DontDragOffTop) { |
EXPECT_EQ("100,10 300x400", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, ResizeBottomOutsideWorkArea) { |
+TEST_F(WorkspaceWindowResizerTest, ResizeBottomOutsideWorkArea) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(0, 0, 50, 0)); |
@@ -891,7 +884,7 @@ TEST_P(WorkspaceWindowResizerTest, ResizeBottomOutsideWorkArea) { |
EXPECT_EQ("100,200 300x380", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideLeftWorkArea) { |
+TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideLeftWorkArea) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(0, 0, 50, 0)); |
int left = ScreenUtil::GetDisplayWorkAreaBoundsInParent(window_.get()).x(); |
@@ -908,7 +901,7 @@ TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideLeftWorkArea) { |
window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideRightWorkArea) { |
+TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideRightWorkArea) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(0, 0, 50, 0)); |
int right = |
@@ -928,7 +921,7 @@ TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideRightWorkArea) { |
window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideBottomWorkArea) { |
+TEST_F(WorkspaceWindowResizerTest, ResizeWindowOutsideBottomWorkArea) { |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
gfx::Insets(0, 0, 50, 0)); |
int bottom = |
@@ -949,7 +942,7 @@ TEST_P(WorkspaceWindowResizerTest, ResizeWindowOutsideBottomWorkArea) { |
// Verifies that 'outside' check of the resizer take into account the extended |
// desktop in case of repositions. |
-TEST_P(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) { |
+TEST_F(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) { |
// Only primary display. Changes the window position to fit within the |
// display. |
Shell::GetInstance()->SetDisplayWorkAreaInsets(Shell::GetPrimaryRootWindow(), |
@@ -981,7 +974,7 @@ TEST_P(WorkspaceWindowResizerTest, DragWindowOutsideRightToSecondaryDisplay) { |
} |
// Verifies snapping to edges works. |
-TEST_P(WorkspaceWindowResizerTest, SnapToEdge) { |
+TEST_F(WorkspaceWindowResizerTest, SnapToEdge) { |
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
window_->SetBounds(gfx::Rect(96, 112, 320, 160)); |
// Click 50px to the right so that the mouse pointer does not leave the |
@@ -1024,9 +1017,6 @@ TEST_P(WorkspaceWindowResizerTest, SnapToEdge) { |
resizer->Drag(CalculateDragPoint(*resizer, distance_to_right + 33, 0), 0); |
EXPECT_EQ("513,112 320x160", window_->bounds().ToString()); |
- // 3 pixels are reserved for auto-hidden shelf height in non-MD, and no space |
- // is reserved for auto hide shelf height in MD. |
- int auto_hidden_shelf_offset = GetMdAutoHiddenShelfHeightOffset(); |
int auto_hidden_shelf_height = GetShelfConstant(SHELF_INSETS_FOR_AUTO_HIDE); |
// And the bottom should snap too. |
@@ -1034,13 +1024,13 @@ TEST_P(WorkspaceWindowResizerTest, SnapToEdge) { |
CalculateDragPoint(*resizer, 0, |
distance_to_bottom - auto_hidden_shelf_height - 7), |
0); |
- EXPECT_EQ(gfx::Rect(96, 437 + auto_hidden_shelf_offset, 320, 160).ToString(), |
+ EXPECT_EQ(gfx::Rect(96, 440, 320, 160).ToString(), |
window_->bounds().ToString()); |
resizer->Drag( |
CalculateDragPoint(*resizer, 0, |
distance_to_bottom - auto_hidden_shelf_height + 15), |
0); |
- EXPECT_EQ(gfx::Rect(96, 437 + auto_hidden_shelf_offset, 320, 160).ToString(), |
+ EXPECT_EQ(gfx::Rect(96, 440, 320, 160).ToString(), |
window_->bounds().ToString()); |
resizer->Drag(CalculateDragPoint(*resizer, 0, distance_to_bottom - 2 + 32), |
0); |
@@ -1060,13 +1050,13 @@ TEST_P(WorkspaceWindowResizerTest, SnapToEdge) { |
CalculateDragPoint(*resizer, 7 - distance_to_left, |
distance_to_bottom - auto_hidden_shelf_height - 7), |
0); |
- EXPECT_EQ(gfx::Rect(0, 437 + auto_hidden_shelf_offset, 320, 160).ToString(), |
+ EXPECT_EQ(gfx::Rect(0, 440, 320, 160).ToString(), |
window_->bounds().ToString()); |
resizer->Drag( |
CalculateDragPoint(*resizer, -15 - distance_to_left, |
distance_to_bottom - auto_hidden_shelf_height + 15), |
0); |
- EXPECT_EQ(gfx::Rect(0, 437 + auto_hidden_shelf_offset, 320, 160).ToString(), |
+ EXPECT_EQ(gfx::Rect(0, 440, 320, 160).ToString(), |
window_->bounds().ToString()); |
// should move past snap points. |
resizer->Drag(CalculateDragPoint(*resizer, -32 - distance_to_left, |
@@ -1082,7 +1072,7 @@ TEST_P(WorkspaceWindowResizerTest, SnapToEdge) { |
} |
// Verifies a resize snap when dragging TOPLEFT. |
-TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_TOPLEFT) { |
+TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_TOPLEFT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
std::unique_ptr<WindowResizer> resizer( |
CreateResizerForTest(window_.get(), gfx::Point(), HTTOPLEFT)); |
@@ -1092,7 +1082,7 @@ TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_TOPLEFT) { |
} |
// Verifies a resize snap when dragging TOPRIGHT. |
-TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_TOPRIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_TOPRIGHT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
gfx::Rect work_area( |
ScreenUtil::GetDisplayWorkAreaBoundsInParent(window_.get())); |
@@ -1108,7 +1098,7 @@ TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_TOPRIGHT) { |
} |
// Verifies a resize snap when dragging BOTTOMRIGHT. |
-TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMRIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMRIGHT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
gfx::Rect work_area( |
ScreenUtil::GetDisplayWorkAreaBoundsInParent(window_.get())); |
@@ -1125,7 +1115,7 @@ TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMRIGHT) { |
} |
// Verifies a resize snap when dragging BOTTOMLEFT. |
-TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMLEFT) { |
+TEST_F(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMLEFT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
gfx::Rect work_area( |
ScreenUtil::GetDisplayWorkAreaBoundsInParent(window_.get())); |
@@ -1141,7 +1131,7 @@ TEST_P(WorkspaceWindowResizerTest, SnapToWorkArea_BOTTOMLEFT) { |
} |
// Verifies window sticks to both window and work area. |
-TEST_P(WorkspaceWindowResizerTest, StickToBothEdgeAndWindow) { |
+TEST_F(WorkspaceWindowResizerTest, StickToBothEdgeAndWindow) { |
window_->SetBounds(gfx::Rect(10, 10, 20, 50)); |
window_->Show(); |
window2_->SetBounds(gfx::Rect(150, 160, 25, 1000)); |
@@ -1188,7 +1178,7 @@ TEST_P(WorkspaceWindowResizerTest, StickToBothEdgeAndWindow) { |
EXPECT_EQ(expected.ToString(), window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, CtrlDragResizeToExactPosition) { |
+TEST_F(WorkspaceWindowResizerTest, CtrlDragResizeToExactPosition) { |
window_->SetBounds(gfx::Rect(96, 112, 320, 160)); |
std::unique_ptr<WindowResizer> resizer( |
CreateResizerForTest(window_.get(), gfx::Point(), HTBOTTOMRIGHT)); |
@@ -1200,7 +1190,7 @@ TEST_P(WorkspaceWindowResizerTest, CtrlDragResizeToExactPosition) { |
} |
// Verifies that a dragged, non-snapped window will clear restore bounds. |
-TEST_P(WorkspaceWindowResizerTest, RestoreClearedOnResize) { |
+TEST_F(WorkspaceWindowResizerTest, RestoreClearedOnResize) { |
window_->SetBounds(gfx::Rect(10, 10, 100, 100)); |
wm::WindowState* window_state = wm::GetWindowState(window_.get()); |
window_state->SetRestoreBoundsInScreen(gfx::Rect(50, 50, 50, 50)); |
@@ -1216,7 +1206,7 @@ TEST_P(WorkspaceWindowResizerTest, RestoreClearedOnResize) { |
} |
// Verifies that a dragged window will restore to its pre-maximized size. |
-TEST_P(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) { |
+TEST_F(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) { |
window_->SetBounds(gfx::Rect(0, 0, 1000, 1000)); |
wm::WindowState* window_state = wm::GetWindowState(window_.get()); |
window_state->SetRestoreBoundsInScreen(gfx::Rect(96, 112, 320, 160)); |
@@ -1233,7 +1223,7 @@ TEST_P(WorkspaceWindowResizerTest, RestoreToPreMaximizeCoordinates) { |
} |
// Verifies that a dragged window will restore to its pre-maximized size. |
-TEST_P(WorkspaceWindowResizerTest, RevertResizeOperation) { |
+TEST_F(WorkspaceWindowResizerTest, RevertResizeOperation) { |
const gfx::Rect initial_bounds(0, 0, 200, 400); |
window_->SetBounds(initial_bounds); |
@@ -1252,7 +1242,7 @@ TEST_P(WorkspaceWindowResizerTest, RevertResizeOperation) { |
} |
// Check that only usable sizes get returned by the resizer. |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyAttach) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyAttach) { |
window_->SetBounds(gfx::Rect(10, 10, 20, 30)); |
window2_->SetBounds(gfx::Rect(150, 160, 25, 20)); |
window2_->Show(); |
@@ -1282,7 +1272,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyAttach) { |
// The following variants verify magnetic snapping during resize when dragging a |
// particular edge. |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOP) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOP) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->SetBounds(gfx::Rect(99, 179, 10, 20)); |
window2_->Show(); |
@@ -1294,7 +1284,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOP) { |
EXPECT_EQ("100,199 20x31", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOPLEFT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOPLEFT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->SetBounds(gfx::Rect(99, 179, 10, 20)); |
window2_->Show(); |
@@ -1319,7 +1309,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOPLEFT) { |
} |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOPRIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_TOPRIGHT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->Show(); |
@@ -1344,7 +1334,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_TOPRIGHT) { |
} |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_RIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_RIGHT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->SetBounds(gfx::Rect(121, 199, 10, 20)); |
window2_->Show(); |
@@ -1356,7 +1346,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_RIGHT) { |
EXPECT_EQ("100,200 21x30", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMRIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMRIGHT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->Show(); |
@@ -1381,7 +1371,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMRIGHT) { |
} |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOM) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOM) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->SetBounds(gfx::Rect(111, 233, 10, 20)); |
window2_->Show(); |
@@ -1393,7 +1383,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOM) { |
EXPECT_EQ("100,200 20x33", window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMLEFT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMLEFT) { |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->Show(); |
@@ -1418,7 +1408,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_BOTTOMLEFT) { |
} |
} |
-TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_LEFT) { |
+TEST_F(WorkspaceWindowResizerTest, MagneticallyResize_LEFT) { |
window2_->SetBounds(gfx::Rect(89, 209, 10, 20)); |
window_->SetBounds(gfx::Rect(100, 200, 20, 30)); |
window2_->Show(); |
@@ -1431,7 +1421,7 @@ TEST_P(WorkspaceWindowResizerTest, MagneticallyResize_LEFT) { |
} |
// Test that the user moved window flag is getting properly set. |
-TEST_P(WorkspaceWindowResizerTest, CheckUserWindowManagedFlags) { |
+TEST_F(WorkspaceWindowResizerTest, CheckUserWindowManagedFlags) { |
window_->SetBounds(gfx::Rect(0, 50, 400, 200)); |
window_->SetProperty(aura::client::kResizeBehaviorKey, |
ui::mojom::kResizeBehaviorCanMaximize); |
@@ -1464,7 +1454,7 @@ TEST_P(WorkspaceWindowResizerTest, CheckUserWindowManagedFlags) { |
} |
// Test that a window with a specified max size doesn't exceed it when dragged. |
-TEST_P(WorkspaceWindowResizerTest, TestMaxSizeEnforced) { |
+TEST_F(WorkspaceWindowResizerTest, TestMaxSizeEnforced) { |
window_->SetBounds(gfx::Rect(0, 0, 400, 300)); |
delegate_.set_max_size(gfx::Size(401, 301)); |
@@ -1476,7 +1466,7 @@ TEST_P(WorkspaceWindowResizerTest, TestMaxSizeEnforced) { |
} |
// Test that a window with a specified max width doesn't restrict its height. |
-TEST_P(WorkspaceWindowResizerTest, TestPartialMaxSizeEnforced) { |
+TEST_F(WorkspaceWindowResizerTest, TestPartialMaxSizeEnforced) { |
window_->SetBounds(gfx::Rect(0, 0, 400, 300)); |
delegate_.set_max_size(gfx::Size(401, 0)); |
@@ -1488,7 +1478,7 @@ TEST_P(WorkspaceWindowResizerTest, TestPartialMaxSizeEnforced) { |
} |
// Test that a window with a specified max size can't be snapped. |
-TEST_P(WorkspaceWindowResizerTest, PhantomSnapMaxSize) { |
+TEST_F(WorkspaceWindowResizerTest, PhantomSnapMaxSize) { |
// Make the window snappable by making it resizable and maximizable. |
window_->SetProperty(aura::client::kResizeBehaviorKey, |
ui::mojom::kResizeBehaviorCanResize | |
@@ -1538,7 +1528,7 @@ TEST_P(WorkspaceWindowResizerTest, PhantomSnapMaxSize) { |
} |
} |
-TEST_P(WorkspaceWindowResizerTest, DontRewardRightmostWindowForOverflows) { |
+TEST_F(WorkspaceWindowResizerTest, DontRewardRightmostWindowForOverflows) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1569,7 +1559,7 @@ TEST_P(WorkspaceWindowResizerTest, DontRewardRightmostWindowForOverflows) { |
EXPECT_EQ("375,100 125x100", window4_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, DontExceedMaxWidth) { |
+TEST_F(WorkspaceWindowResizerTest, DontExceedMaxWidth) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1598,7 +1588,7 @@ TEST_P(WorkspaceWindowResizerTest, DontExceedMaxWidth) { |
EXPECT_EQ("350,100 150x100", window4_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, DontExceedMaxHeight) { |
+TEST_F(WorkspaceWindowResizerTest, DontExceedMaxHeight) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1627,7 +1617,7 @@ TEST_P(WorkspaceWindowResizerTest, DontExceedMaxHeight) { |
EXPECT_EQ("100,350 100x150", window4_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, DontExceedMinHeight) { |
+TEST_F(WorkspaceWindowResizerTest, DontExceedMinHeight) { |
UpdateDisplay("600x500"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1656,7 +1646,7 @@ TEST_P(WorkspaceWindowResizerTest, DontExceedMinHeight) { |
EXPECT_EQ("100,450 100x50", window4_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, DontExpandRightmostPastMaxWidth) { |
+TEST_F(WorkspaceWindowResizerTest, DontExpandRightmostPastMaxWidth) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1682,7 +1672,7 @@ TEST_P(WorkspaceWindowResizerTest, DontExpandRightmostPastMaxWidth) { |
EXPECT_EQ("299,100 101x100", window3_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MoveAttachedWhenGrownToMaxSize) { |
+TEST_F(WorkspaceWindowResizerTest, MoveAttachedWhenGrownToMaxSize) { |
UpdateDisplay("600x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1709,7 +1699,7 @@ TEST_P(WorkspaceWindowResizerTest, MoveAttachedWhenGrownToMaxSize) { |
EXPECT_EQ("249,100 101x100", window3_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MainWindowHonoursMaxWidth) { |
+TEST_F(WorkspaceWindowResizerTest, MainWindowHonoursMaxWidth) { |
UpdateDisplay("400x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1736,7 +1726,7 @@ TEST_P(WorkspaceWindowResizerTest, MainWindowHonoursMaxWidth) { |
EXPECT_EQ("301,100 99x100", window3_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, MainWindowHonoursMinWidth) { |
+TEST_F(WorkspaceWindowResizerTest, MainWindowHonoursMinWidth) { |
UpdateDisplay("400x800"); |
aura::Window* root = Shell::GetPrimaryRootWindow(); |
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets()); |
@@ -1763,7 +1753,7 @@ TEST_P(WorkspaceWindowResizerTest, MainWindowHonoursMinWidth) { |
// The following variants test that windows are resized correctly to the edges |
// of the screen using touch, when touch point is off of the window border. |
-TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) { |
+TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) { |
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTRIGHT); |
@@ -1794,7 +1784,7 @@ TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_RIGHT) { |
touch_resize_window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) { |
+TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) { |
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTLEFT); |
@@ -1825,7 +1815,7 @@ TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_LEFT) { |
touch_resize_window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) { |
+TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) { |
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTTOP); |
@@ -1853,7 +1843,7 @@ TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_TOP) { |
touch_resize_window_->bounds().ToString()); |
} |
-TEST_P(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) { |
+TEST_F(WorkspaceWindowResizerTest, TouchResizeToEdge_BOTTOM) { |
GetPrimaryShelf()->SetAutoHideBehavior(SHELF_AUTO_HIDE_ALWAYS_HIDDEN); |
InitTouchResizeWindow(gfx::Rect(100, 100, 600, kRootHeight - 200), HTBOTTOM); |