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

Unified Diff: ash/wm/dock/docked_window_layout_manager_unittest.cc

Issue 2370913002: Removes AshTestBase::SupportsHostWindowResize (Closed)
Patch Set: feedback Created 4 years, 3 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 | « ash/test/ash_test_helper.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_layout_manager_unittest.cc
diff --git a/ash/wm/dock/docked_window_layout_manager_unittest.cc b/ash/wm/dock/docked_window_layout_manager_unittest.cc
index e5e3b8cb0e0842c473ee2cacd916eab7dd333454..71797734338860099f58827ecb475c7f9cf4acc7 100644
--- a/ash/wm/dock/docked_window_layout_manager_unittest.cc
+++ b/ash/wm/dock/docked_window_layout_manager_unittest.cc
@@ -208,9 +208,6 @@ class DockedWindowLayoutManagerTest
// Tests that a created window is successfully added to the dock
// layout manager.
TEST_P(DockedWindowLayoutManagerTest, AddOneWindow) {
- if (!SupportsHostWindowResize())
- return;
-
gfx::Rect bounds(0, 0, 201, 201);
std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
@@ -225,9 +222,6 @@ TEST_P(DockedWindowLayoutManagerTest, AddOneWindow) {
// Tests that a docked window's bounds cannot be changed programmatically.
TEST_P(DockedWindowLayoutManagerTest, DockedWindowBoundsDontChange) {
- if (!SupportsHostWindowResize())
- return;
-
gfx::Rect bounds(0, 0, 201, 201);
std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
@@ -243,9 +237,6 @@ TEST_P(DockedWindowLayoutManagerTest, DockedWindowBoundsDontChange) {
// Tests that with a window docked on the left the auto-placing logic in
// RearrangeVisibleWindowOnShow places windows flush with work area edges.
TEST_P(DockedWindowLayoutManagerTest, AutoPlacingLeft) {
- if (!SupportsHostWindowResize())
- return;
-
gfx::Rect bounds(0, 0, 201, 201);
std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
DragRelativeToEdge(DOCKED_EDGE_LEFT, window.get(), 0);
@@ -294,9 +285,6 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingLeft) {
// Tests that with a window docked on the right the auto-placing logic in
// RearrangeVisibleWindowOnShow places windows flush with work area edges.
TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRight) {
- if (!SupportsHostWindowResize())
- return;
-
gfx::Rect bounds(0, 0, 201, 201);
std::unique_ptr<aura::Window> window(CreateTestWindow(bounds));
DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
@@ -344,7 +332,7 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRight) {
// RearrangeVisibleWindowOnShow places windows flush with work area edges.
// Test case for the secondary screen.
TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRightSecondScreen) {
- if (!SupportsMultipleDisplays() || !SupportsHostWindowResize())
+ if (!SupportsMultipleDisplays())
return;
// Create a dual screen layout.
@@ -400,9 +388,6 @@ TEST_P(DockedWindowLayoutManagerTest, AutoPlacingRightSecondScreen) {
// Adds two windows and tests that the gaps are evenly distributed.
TEST_P(DockedWindowLayoutManagerTest, AddTwoWindows) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
@@ -430,9 +415,6 @@ TEST_P(DockedWindowLayoutManagerTest, AddTwoWindows) {
// Adds two non-overlapping windows and tests layout after a drag.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsDragging) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
@@ -465,8 +447,6 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsDragging) {
// Adds three overlapping windows and tests layout after a drag.
TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDragging) {
- if (!SupportsHostWindowResize())
- return;
UpdateDisplay("600x1000");
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 310)));
@@ -528,7 +508,7 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDragging) {
// Adds three windows in bottom display and tests layout after a drag.
TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
- if (!SupportsMultipleDisplays() || !SupportsHostWindowResize())
+ if (!SupportsMultipleDisplays())
return;
// Create two screen vertical layout.
@@ -600,9 +580,6 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsDraggingSecondScreen) {
// Tests that a second window added to the dock is resized to match.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNew) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
@@ -616,9 +593,6 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNew) {
// Tests that a first non-resizable window added to the dock is not resized.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableFirst) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
w1->SetProperty(aura::client::kCanResizeKey, false);
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
@@ -633,9 +607,6 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableFirst) {
// Tests that a second non-resizable window added to the dock is not resized.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableSecond) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 280, 202)));
w2->SetProperty(aura::client::kCanResizeKey, false);
@@ -653,9 +624,6 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthNonResizableSecond) {
// Test that restrictions on minimum and maximum width of windows are honored.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthRestrictions) {
- if (!SupportsHostWindowResize())
- return;
-
aura::test::TestWindowDelegate delegate1;
delegate1.set_maximum_size(gfx::Size(240, 0));
std::unique_ptr<aura::Window> w1(
@@ -678,9 +646,6 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsWidthRestrictions) {
// Test that restrictions on minimum width of windows are honored.
TEST_P(DockedWindowLayoutManagerTest, WidthMoreThanMax) {
- if (!SupportsHostWindowResize())
- return;
-
aura::test::TestWindowDelegate delegate;
delegate.set_minimum_size(gfx::Size(400, 0));
std::unique_ptr<aura::Window> window(
@@ -702,9 +667,6 @@ TEST_P(DockedWindowLayoutManagerTest, WidthMoreThanMax) {
// Docks three windows and tests that the very first window gets minimized.
TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsMinimize) {
- if (!SupportsHostWindowResize())
- return;
-
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
std::unique_ptr<aura::Window> w2(CreateTestWindow(gfx::Rect(0, 0, 210, 202)));
@@ -738,9 +700,6 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsMinimize) {
// Docks up to three windows and tests that they split vertical space.
TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) {
- if (!SupportsHostWindowResize())
- return;
-
UpdateDisplay("600x1000");
std::unique_ptr<aura::Window> w1(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
DragToVerticalPositionAndToEdge(DOCKED_EDGE_RIGHT, w1.get(), 20);
@@ -784,9 +743,6 @@ TEST_P(DockedWindowLayoutManagerTest, ThreeWindowsSplitHeightEvenly) {
// Docks two windows and tests that restrictions on vertical size are honored.
TEST_P(DockedWindowLayoutManagerTest, TwoWindowsHeightRestrictions) {
- if (!SupportsHostWindowResize())
- return;
-
// The first window is fixed height.
aura::test::TestWindowDelegate delegate1;
delegate1.set_minimum_size(gfx::Size(0, 300));
@@ -826,7 +782,7 @@ TEST_P(DockedWindowLayoutManagerTest, TwoWindowsHeightRestrictions) {
// Tests that a docked window is moved to primary display when secondary display
// is disconnected and that it stays docked and properly positioned.
TEST_P(DockedWindowLayoutManagerTest, DisplayDisconnectionMovesDocked) {
- if (!SupportsMultipleDisplays() || !SupportsHostWindowResize())
+ if (!SupportsMultipleDisplays())
return;
// Create a dual screen layout.
« no previous file with comments | « ash/test/ash_test_helper.cc ('k') | ash/wm/dock/docked_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698