Index: ash/display/display_manager_unittest.cc |
diff --git a/ash/display/display_manager_unittest.cc b/ash/display/display_manager_unittest.cc |
index b19455ab98c3cde1baf6ee8b9338d3223e2cd5c8..cea000eaf25a602095f306d53cae096eacd66ff7 100644 |
--- a/ash/display/display_manager_unittest.cc |
+++ b/ash/display/display_manager_unittest.cc |
@@ -6,7 +6,6 @@ |
#include "ash/accelerators/accelerator_commands_aura.h" |
#include "ash/common/ash_switches.h" |
-#include "ash/common/material_design/material_design_controller.h" |
#include "ash/common/wm/window_state.h" |
#include "ash/display/display_configuration_controller.h" |
#include "ash/display/display_util.h" |
@@ -14,7 +13,6 @@ |
#include "ash/display/window_tree_host_manager.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/test/mirror_window_test_api.h" |
#include "ash/wm/window_state_aura.h" |
@@ -56,7 +54,7 @@ std::string ToDisplayName(int64_t id) { |
} // namespace |
-class DisplayManagerTest : public test::AshMDTestBase, |
+class DisplayManagerTest : public test::AshTestBase, |
public display::DisplayObserver, |
public aura::WindowObserver { |
public: |
@@ -67,14 +65,14 @@ class DisplayManagerTest : public test::AshMDTestBase, |
~DisplayManagerTest() override {} |
void SetUp() override { |
- AshMDTestBase::SetUp(); |
+ AshTestBase::SetUp(); |
display::Screen::GetScreen()->AddObserver(this); |
Shell::GetPrimaryRootWindow()->AddObserver(this); |
} |
void TearDown() override { |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
display::Screen::GetScreen()->RemoveObserver(this); |
- AshMDTestBase::TearDown(); |
+ AshTestBase::TearDown(); |
} |
const vector<display::Display>& changed() const { return changed_; } |
@@ -142,14 +140,7 @@ class DisplayManagerTest : public test::AshMDTestBase, |
DISALLOW_COPY_AND_ASSIGN(DisplayManagerTest); |
}; |
-INSTANTIATE_TEST_CASE_P( |
- /* prefix intentionally left blank due to only one parameterization */, |
- DisplayManagerTest, |
- testing::Values(MaterialDesignController::NON_MATERIAL, |
- MaterialDesignController::MATERIAL_NORMAL, |
- MaterialDesignController::MATERIAL_EXPERIMENTAL)); |
- |
-TEST_P(DisplayManagerTest, UpdateDisplayTest) { |
+TEST_F(DisplayManagerTest, UpdateDisplayTest) { |
EXPECT_EQ(1U, display_manager()->GetNumDisplays()); |
// Update primary and add seconary. |
@@ -251,7 +242,7 @@ TEST_P(DisplayManagerTest, UpdateDisplayTest) { |
display_manager()->GetDisplayAt(1).bounds().ToString()); |
} |
-TEST_P(DisplayManagerTest, ScaleOnlyChange) { |
+TEST_F(DisplayManagerTest, ScaleOnlyChange) { |
display_manager()->ToggleDisplayScaleFactor(); |
EXPECT_TRUE(changed_metrics() & |
display::DisplayObserver::DISPLAY_METRIC_BOUNDS); |
@@ -260,7 +251,7 @@ TEST_P(DisplayManagerTest, ScaleOnlyChange) { |
} |
// Test in emulation mode (use_fullscreen_host_window=false) |
-TEST_P(DisplayManagerTest, EmulatorTest) { |
+TEST_F(DisplayManagerTest, EmulatorTest) { |
EXPECT_EQ(1U, display_manager()->GetNumDisplays()); |
display_manager()->AddRemoveDisplay(); |
@@ -280,7 +271,7 @@ TEST_P(DisplayManagerTest, EmulatorTest) { |
} |
// Tests support for 3 displays. |
-TEST_P(DisplayManagerTest, UpdateThreeDisplaysWithDefaultLayout) { |
+TEST_F(DisplayManagerTest, UpdateThreeDisplaysWithDefaultLayout) { |
EXPECT_EQ(1U, display_manager()->GetNumDisplays()); |
// Test with three displays. Native origin will not affect ash |
@@ -339,7 +330,7 @@ TEST_P(DisplayManagerTest, UpdateThreeDisplaysWithDefaultLayout) { |
display_manager()->GetDisplayAt(2).bounds().ToString()); |
} |
-TEST_P(DisplayManagerTest, LayoutMorethanThreeDisplaysTest) { |
+TEST_F(DisplayManagerTest, LayoutMorethanThreeDisplaysTest) { |
int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
display::DisplayIdList list = display::test::CreateDisplayIdListN( |
3, primary_id, primary_id + 1, primary_id + 2); |
@@ -457,7 +448,7 @@ TEST_P(DisplayManagerTest, LayoutMorethanThreeDisplaysTest) { |
// Makes sure that layouts with overlapped displays are detected and fixed when |
// applied. |
-TEST_P(DisplayManagerTest, NoOverlappedDisplays) { |
+TEST_F(DisplayManagerTest, NoOverlappedDisplays) { |
int64_t primary_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
{ |
// Layout with multiple overlaps and special cases: |
@@ -744,7 +735,7 @@ TEST_P(DisplayManagerTest, NoOverlappedDisplays) { |
} |
} |
-TEST_P(DisplayManagerTest, NoOverlappedDisplaysNotFitBetweenTwo) { |
+TEST_F(DisplayManagerTest, NoOverlappedDisplaysNotFitBetweenTwo) { |
// +------+--+----+--+------+ |
// | 1 | | 2 | | 3 | |
// | | | | | | |
@@ -798,7 +789,7 @@ TEST_P(DisplayManagerTest, NoOverlappedDisplaysNotFitBetweenTwo) { |
display_manager()->GetDisplayAt(3).bounds()); |
} |
-TEST_P(DisplayManagerTest, NoOverlappedDisplaysAfterResolutionChange) { |
+TEST_F(DisplayManagerTest, NoOverlappedDisplaysAfterResolutionChange) { |
// Starting with a good layout with no overlaps, test that if the resolution |
// of one of the displays is changed, it won't result in any overlaps. |
// |
@@ -887,7 +878,7 @@ TEST_P(DisplayManagerTest, NoOverlappedDisplaysAfterResolutionChange) { |
display_manager()->GetDisplayAt(4).bounds()); |
} |
-TEST_P(DisplayManagerTest, NoOverlappedDisplaysWithDetachedDisplays) { |
+TEST_F(DisplayManagerTest, NoOverlappedDisplaysWithDetachedDisplays) { |
// Detached displays that intersect other non-detached displays. |
// |
// +---------+---------+---------+ |
@@ -974,7 +965,7 @@ TEST_P(DisplayManagerTest, NoOverlappedDisplaysWithDetachedDisplays) { |
EXPECT_TRUE(layout.HasSamePlacementList(*(expected_layout_builder.Build()))); |
} |
-TEST_P(DisplayManagerTest, NoMirrorInThreeDisplays) { |
+TEST_F(DisplayManagerTest, NoMirrorInThreeDisplays) { |
UpdateDisplay("640x480,320x200,400x300"); |
ash::Shell::GetInstance()->display_configuration_controller()->SetMirrorMode( |
true, true); |
@@ -984,7 +975,7 @@ TEST_P(DisplayManagerTest, NoMirrorInThreeDisplays) { |
GetDisplayErrorNotificationMessageForTest()); |
} |
-TEST_P(DisplayManagerTest, OverscanInsetsTest) { |
+TEST_F(DisplayManagerTest, OverscanInsetsTest) { |
UpdateDisplay("0+0-500x500,0+501-400x400"); |
reset(); |
ASSERT_EQ(2u, display_manager()->GetNumDisplays()); |
@@ -1106,7 +1097,7 @@ TEST_P(DisplayManagerTest, OverscanInsetsTest) { |
display::Screen::GetScreen()->GetPrimaryDisplay().bounds().ToString()); |
} |
-TEST_P(DisplayManagerTest, ZeroOverscanInsets) { |
+TEST_F(DisplayManagerTest, ZeroOverscanInsets) { |
// Make sure the display change events is emitted for overscan inset changes. |
UpdateDisplay("0+0-500x500,0+501-400x400"); |
ASSERT_EQ(2u, display_manager()->GetNumDisplays()); |
@@ -1127,7 +1118,7 @@ TEST_P(DisplayManagerTest, ZeroOverscanInsets) { |
EXPECT_EQ(display2_id, changed()[0].id()); |
} |
-TEST_P(DisplayManagerTest, TouchCalibrationTest) { |
+TEST_F(DisplayManagerTest, TouchCalibrationTest) { |
UpdateDisplay("0+0-500x500,0+501-1024x600"); |
reset(); |
@@ -1197,7 +1188,7 @@ TEST_P(DisplayManagerTest, TouchCalibrationTest) { |
EXPECT_EQ(touch_data, updated_display_info2.GetTouchCalibrationData()); |
} |
-TEST_P(DisplayManagerTest, TestDeviceScaleOnlyChange) { |
+TEST_F(DisplayManagerTest, TestDeviceScaleOnlyChange) { |
UpdateDisplay("1000x600"); |
aura::WindowTreeHost* host = Shell::GetPrimaryRootWindow()->GetHost(); |
EXPECT_EQ(1, host->compositor()->device_scale_factor()); |
@@ -1219,7 +1210,7 @@ display::ManagedDisplayInfo CreateDisplayInfo(int64_t id, |
return info; |
} |
-TEST_P(DisplayManagerTest, TestNativeDisplaysChanged) { |
+TEST_F(DisplayManagerTest, TestNativeDisplaysChanged) { |
const int64_t internal_display_id = |
display::test::DisplayManagerTestApi(display_manager()) |
.SetFirstDisplayAsInternalDisplay(); |
@@ -1384,7 +1375,7 @@ TEST_P(DisplayManagerTest, TestNativeDisplaysChanged) { |
// Make sure crash does not happen if add and remove happens at the same time. |
// See: crbug.com/414394 |
-TEST_P(DisplayManagerTest, DisplayAddRemoveAtTheSameTime) { |
+TEST_F(DisplayManagerTest, DisplayAddRemoveAtTheSameTime) { |
UpdateDisplay("100+0-500x500,0+501-400x400"); |
const int64_t primary_id = WindowTreeHostManager::GetPrimaryDisplayId(); |
@@ -1412,7 +1403,7 @@ TEST_P(DisplayManagerTest, DisplayAddRemoveAtTheSameTime) { |
EXPECT_EQ("600x600", GetDisplayForId(third_id).size().ToString()); |
} |
-TEST_P(DisplayManagerTest, TestNativeDisplaysChangedNoInternal) { |
+TEST_F(DisplayManagerTest, TestNativeDisplaysChangedNoInternal) { |
EXPECT_EQ(1U, display_manager()->GetNumDisplays()); |
// Don't change the display info if all displays are disconnected. |
@@ -1435,7 +1426,7 @@ TEST_P(DisplayManagerTest, TestNativeDisplaysChangedNoInternal) { |
.ToString()); |
} |
-TEST_P(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) { |
+TEST_F(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) { |
const int64_t internal_display_id = |
display::test::DisplayManagerTestApi(display_manager()) |
.SetFirstDisplayAsInternalDisplay(); |
@@ -1467,7 +1458,7 @@ TEST_P(DisplayManagerTest, NativeDisplaysChangedAfterPrimaryChange) { |
EXPECT_EQ("0,0 100x100", GetDisplayForId(10).bounds().ToString()); |
} |
-TEST_P(DisplayManagerTest, DontRememberBestResolution) { |
+TEST_F(DisplayManagerTest, DontRememberBestResolution) { |
int display_id = 1000; |
display::ManagedDisplayInfo native_display_info = |
CreateDisplayInfo(display_id, gfx::Rect(0, 0, 1000, 500)); |
@@ -1534,7 +1525,7 @@ TEST_P(DisplayManagerTest, DontRememberBestResolution) { |
display_manager()->GetActiveModeForDisplayId(display_id))); |
} |
-TEST_P(DisplayManagerTest, ResolutionFallback) { |
+TEST_F(DisplayManagerTest, ResolutionFallback) { |
int display_id = 1000; |
display::ManagedDisplayInfo native_display_info = |
CreateDisplayInfo(display_id, gfx::Rect(0, 0, 1000, 500)); |
@@ -1591,7 +1582,7 @@ TEST_P(DisplayManagerTest, ResolutionFallback) { |
} |
} |
-TEST_P(DisplayManagerTest, Rotate) { |
+TEST_F(DisplayManagerTest, Rotate) { |
UpdateDisplay("100x200/r,300x400/l"); |
EXPECT_EQ("1,1 100x200", GetDisplayInfoAt(0).bounds_in_native().ToString()); |
EXPECT_EQ("200x100", GetDisplayInfoAt(0).size_in_pixel().ToString()); |
@@ -1676,7 +1667,7 @@ TEST_P(DisplayManagerTest, Rotate) { |
post_rotation_info.GetActiveRotation()); |
} |
-TEST_P(DisplayManagerTest, UIScale) { |
+TEST_F(DisplayManagerTest, UIScale) { |
display::test::ScopedDisable125DSFForUIScaling disable; |
UpdateDisplay("1280x800"); |
@@ -1802,7 +1793,7 @@ TEST_P(DisplayManagerTest, UIScale) { |
EXPECT_EQ("1280x850", display.bounds().size().ToString()); |
} |
-TEST_P(DisplayManagerTest, UIScaleWithDisplayMode) { |
+TEST_F(DisplayManagerTest, UIScaleWithDisplayMode) { |
int display_id = 1000; |
// Setup the display modes with UI-scale. |
@@ -1894,7 +1885,7 @@ TEST_P(DisplayManagerTest, UIScaleWithDisplayMode) { |
// Tests that ResetInternalDisplayZoom() resets to the default 0.8f UI scale |
// defined for the 1.25x displays. |
-TEST_P(DisplayManagerTest, ResetInternalDisplayZoomFor1_25x) { |
+TEST_F(DisplayManagerTest, ResetInternalDisplayZoomFor1_25x) { |
// Setup the display modes with UI-scale. |
const scoped_refptr<display::ManagedDisplayMode> base_mode( |
new display::ManagedDisplayMode(gfx::Size(1920, 1080), 60.0f, |
@@ -1937,7 +1928,7 @@ TEST_P(DisplayManagerTest, ResetInternalDisplayZoomFor1_25x) { |
EXPECT_EQ("1536x864", GetDisplayForId(display_id).size().ToString()); |
} |
-TEST_P(DisplayManagerTest, Use125DSFForUIScaling) { |
+TEST_F(DisplayManagerTest, Use125DSFForUIScaling) { |
int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
display::test::ScopedSetInternalDisplayId set_internal(display_manager(), |
@@ -1965,7 +1956,7 @@ TEST_P(DisplayManagerTest, Use125DSFForUIScaling) { |
EXPECT_EQ("2400x1350", GetDisplayForId(display_id).size().ToString()); |
} |
-TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScaling) { |
+TEST_F(DisplayManagerTest, FHD125DefaultsTo08UIScaling) { |
int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
display_id++; |
@@ -1995,7 +1986,7 @@ TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScaling) { |
// Don't default to 1.25 DSF if the user already has a prefrence stored for |
// the internal display. |
-TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScalingNoOverride) { |
+TEST_F(DisplayManagerTest, FHD125DefaultsTo08UIScalingNoOverride) { |
int64_t display_id = display::Screen::GetScreen()->GetPrimaryDisplay().id(); |
display_id++; |
@@ -2027,7 +2018,7 @@ TEST_P(DisplayManagerTest, FHD125DefaultsTo08UIScalingNoOverride) { |
EXPECT_EQ(1.0f, GetDisplayInfoAt(0).GetEffectiveUIScale()); |
} |
-TEST_P(DisplayManagerTest, ResolutionChangeInUnifiedMode) { |
+TEST_F(DisplayManagerTest, ResolutionChangeInUnifiedMode) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2072,7 +2063,7 @@ TEST_P(DisplayManagerTest, ResolutionChangeInUnifiedMode) { |
EXPECT_EQ("1200x600", active_mode->size().ToString()); |
} |
-TEST_P(DisplayManagerTest, UpdateMouseCursorAfterRotateZoom) { |
+TEST_F(DisplayManagerTest, UpdateMouseCursorAfterRotateZoom) { |
// Make sure just rotating will not change native location. |
UpdateDisplay("300x200,200x150"); |
aura::Window::Windows root_windows = Shell::GetAllRootWindows(); |
@@ -2153,7 +2144,7 @@ class TestDisplayObserver : public display::DisplayObserver { |
DISALLOW_COPY_AND_ASSIGN(TestDisplayObserver); |
}; |
-TEST_P(DisplayManagerTest, SoftwareMirroring) { |
+TEST_F(DisplayManagerTest, SoftwareMirroring) { |
UpdateDisplay("300x400,400x500"); |
test::MirrorWindowTestApi test_api; |
@@ -2216,7 +2207,7 @@ TEST_P(DisplayManagerTest, SoftwareMirroring) { |
display::Screen::GetScreen()->RemoveObserver(&display_observer); |
} |
-TEST_P(DisplayManagerTest, RotateInSoftwareMirroring) { |
+TEST_F(DisplayManagerTest, RotateInSoftwareMirroring) { |
UpdateDisplay("600x400,500x300"); |
display_manager()->SetMirrorMode(true); |
@@ -2228,7 +2219,7 @@ TEST_P(DisplayManagerTest, RotateInSoftwareMirroring) { |
display_manager()->SetMirrorMode(false); |
} |
-TEST_P(DisplayManagerTest, SingleDisplayToSoftwareMirroring) { |
+TEST_F(DisplayManagerTest, SingleDisplayToSoftwareMirroring) { |
UpdateDisplay("600x400"); |
display_manager()->SetMultiDisplayMode(display::DisplayManager::MIRRORING); |
@@ -2249,7 +2240,7 @@ TEST_P(DisplayManagerTest, SingleDisplayToSoftwareMirroring) { |
} |
// Make sure this does not cause any crashes. See http://crbug.com/412910 |
-TEST_P(DisplayManagerTest, SoftwareMirroringWithCompositingCursor) { |
+TEST_F(DisplayManagerTest, SoftwareMirroringWithCompositingCursor) { |
UpdateDisplay("300x400,400x500"); |
test::MirrorWindowTestApi test_api; |
@@ -2281,7 +2272,7 @@ TEST_P(DisplayManagerTest, SoftwareMirroringWithCompositingCursor) { |
Shell::GetInstance()->SetCursorCompositingEnabled(false); |
} |
-TEST_P(DisplayManagerTest, MirroredLayout) { |
+TEST_F(DisplayManagerTest, MirroredLayout) { |
UpdateDisplay("500x500,400x400"); |
EXPECT_FALSE(display_manager()->GetCurrentDisplayLayout().mirrored); |
EXPECT_EQ(2, display::Screen::GetScreen()->GetNumDisplays()); |
@@ -2298,7 +2289,7 @@ TEST_P(DisplayManagerTest, MirroredLayout) { |
EXPECT_EQ(2U, display_manager()->num_connected_displays()); |
} |
-TEST_P(DisplayManagerTest, InvertLayout) { |
+TEST_F(DisplayManagerTest, InvertLayout) { |
EXPECT_EQ("left, 0", |
display::DisplayPlacement(display::DisplayPlacement::RIGHT, 0) |
.Swap() |
@@ -2352,7 +2343,7 @@ TEST_P(DisplayManagerTest, InvertLayout) { |
.ToString()); |
} |
-TEST_P(DisplayManagerTest, NotifyPrimaryChange) { |
+TEST_F(DisplayManagerTest, NotifyPrimaryChange) { |
UpdateDisplay("500x500,500x500"); |
SwapPrimaryDisplay(); |
reset(); |
@@ -2375,7 +2366,7 @@ TEST_P(DisplayManagerTest, NotifyPrimaryChange) { |
display::DisplayObserver::DISPLAY_METRIC_PRIMARY); |
} |
-TEST_P(DisplayManagerTest, NotifyPrimaryChangeUndock) { |
+TEST_F(DisplayManagerTest, NotifyPrimaryChangeUndock) { |
// Assume the default display is an external display, and |
// emulates undocking by switching to another display. |
display::ManagedDisplayInfo another_display_info = |
@@ -2392,7 +2383,7 @@ TEST_P(DisplayManagerTest, NotifyPrimaryChangeUndock) { |
display::DisplayObserver::DISPLAY_METRIC_PRIMARY); |
} |
-TEST_P(DisplayManagerTest, UpdateDisplayWithHostOrigin) { |
+TEST_F(DisplayManagerTest, UpdateDisplayWithHostOrigin) { |
UpdateDisplay("100x200,300x400"); |
ASSERT_EQ(2, display::Screen::GetScreen()->GetNumDisplays()); |
aura::Window::Windows root_windows = |
@@ -2429,7 +2420,7 @@ TEST_P(DisplayManagerTest, UpdateDisplayWithHostOrigin) { |
EXPECT_EQ("200x300", host1->GetBoundsInPixels().size().ToString()); |
} |
-TEST_P(DisplayManagerTest, UnifiedDesktopBasic) { |
+TEST_F(DisplayManagerTest, UnifiedDesktopBasic) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2488,7 +2479,7 @@ TEST_P(DisplayManagerTest, UnifiedDesktopBasic) { |
.size()); |
} |
-TEST_P(DisplayManagerTest, UnifiedDesktopWithHardwareMirroring) { |
+TEST_F(DisplayManagerTest, UnifiedDesktopWithHardwareMirroring) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2526,7 +2517,7 @@ TEST_P(DisplayManagerTest, UnifiedDesktopWithHardwareMirroring) { |
EXPECT_TRUE(display_manager()->IsInUnifiedMode()); |
} |
-TEST_P(DisplayManagerTest, UnifiedDesktopEnabledWithExtended) { |
+TEST_F(DisplayManagerTest, UnifiedDesktopEnabledWithExtended) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2541,7 +2532,7 @@ TEST_P(DisplayManagerTest, UnifiedDesktopEnabledWithExtended) { |
EXPECT_FALSE(display_manager()->IsInUnifiedMode()); |
} |
-TEST_P(DisplayManagerTest, UnifiedDesktopWith2xDSF) { |
+TEST_F(DisplayManagerTest, UnifiedDesktopWith2xDSF) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2643,7 +2634,7 @@ TEST_P(DisplayManagerTest, UnifiedDesktopWith2xDSF) { |
// Updating displays again in unified desktop mode should not crash. |
// crbug.com/491094. |
-TEST_P(DisplayManagerTest, ConfigureUnifiedTwice) { |
+TEST_F(DisplayManagerTest, ConfigureUnifiedTwice) { |
// Don't check root window destruction in unified mode. |
Shell::GetPrimaryRootWindow()->RemoveObserver(this); |
@@ -2655,7 +2646,7 @@ TEST_P(DisplayManagerTest, ConfigureUnifiedTwice) { |
RunAllPendingInMessageLoop(); |
} |
-TEST_P(DisplayManagerTest, NoRotateUnifiedDesktop) { |
+TEST_F(DisplayManagerTest, NoRotateUnifiedDesktop) { |
display_manager()->SetUnifiedDesktopEnabled(true); |
// Don't check root window destruction in unified mode. |
@@ -2681,12 +2672,11 @@ TEST_P(DisplayManagerTest, NoRotateUnifiedDesktop) { |
// Makes sure the transition from unified to single won't crash |
// with docked windows. |
-TEST_P(DisplayManagerTest, UnifiedWithDockWindows) { |
+TEST_F(DisplayManagerTest, UnifiedWithDockWindows) { |
// Enable window docking for this test. |
base::CommandLine::ForCurrentProcess()->AppendSwitch( |
ash::switches::kAshEnableDockedWindows); |
- const int height_offset = GetMdMaximizedWindowHeightOffset(); |
display_manager()->SetUnifiedDesktopEnabled(true); |
// Don't check root window destruction in unified mode. |
@@ -2698,18 +2688,15 @@ TEST_P(DisplayManagerTest, UnifiedWithDockWindows) { |
CreateTestWindowInShellWithBounds(gfx::Rect(10, 10, 50, 50))); |
docked->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_DOCKED); |
ASSERT_TRUE(wm::GetWindowState(docked.get())->IsDocked()); |
- // 47 pixels reserved for launcher shelf height in non-material design, and |
- // 48 pixels reserved in material design. |
- EXPECT_EQ(gfx::Rect(0, 0, 250, 453 + height_offset).ToString(), |
- docked->bounds().ToString()); |
+ // 48 pixels reserved for launcher shelf height. |
+ EXPECT_EQ(gfx::Rect(0, 0, 250, 452).ToString(), docked->bounds().ToString()); |
UpdateDisplay("300x300"); |
// Make sure the window is still docked. |
EXPECT_TRUE(wm::GetWindowState(docked.get())->IsDocked()); |
- EXPECT_EQ(gfx::Rect(0, 0, 250, 253 + height_offset).ToString(), |
- docked->bounds().ToString()); |
+ EXPECT_EQ(gfx::Rect(0, 0, 250, 252).ToString(), docked->bounds().ToString()); |
} |
-TEST_P(DisplayManagerTest, DockMode) { |
+TEST_F(DisplayManagerTest, DockMode) { |
const int64_t internal_id = 1; |
const int64_t external_id = 2; |
@@ -2743,7 +2730,7 @@ TEST_P(DisplayManagerTest, DockMode) { |
} |
// Make sure that bad layout information is ignored and does not crash. |
-TEST_P(DisplayManagerTest, DontRegisterBadConfig) { |
+TEST_F(DisplayManagerTest, DontRegisterBadConfig) { |
display::DisplayIdList list = display::test::CreateDisplayIdList2(1, 2); |
display::DisplayLayoutBuilder builder(1); |
builder.AddDisplayPlacement(2, 1, display::DisplayPlacement::LEFT, 0); |
@@ -2907,7 +2894,7 @@ TEST_F(DisplayManagerFontTest, |
EXPECT_EQ(gfx::FontRenderParams::HINTING_NONE, GetFontHintingParams()); |
} |
-TEST_P(DisplayManagerTest, CheckInitializationOfRotationProperty) { |
+TEST_F(DisplayManagerTest, CheckInitializationOfRotationProperty) { |
int64_t id = display_manager()->GetDisplayAt(0).id(); |
display_manager()->RegisterDisplayProperty( |
id, display::Display::ROTATE_90, 1.0f, nullptr, gfx::Size(), 1.0f, |
@@ -2922,7 +2909,7 @@ TEST_P(DisplayManagerTest, CheckInitializationOfRotationProperty) { |
info.GetRotation(display::Display::ROTATION_SOURCE_ACTIVE)); |
} |
-TEST_P(DisplayManagerTest, RejectInvalidLayoutData) { |
+TEST_F(DisplayManagerTest, RejectInvalidLayoutData) { |
display::DisplayLayoutStore* layout_store = display_manager()->layout_store(); |
int64_t id1 = 10001; |
int64_t id2 = 10002; |
@@ -2947,7 +2934,7 @@ TEST_P(DisplayManagerTest, RejectInvalidLayoutData) { |
layout_store->GetRegisteredDisplayLayout(good_list).ToString()); |
} |
-TEST_P(DisplayManagerTest, GuessDisplayIdFieldsInDisplayLayout) { |
+TEST_F(DisplayManagerTest, GuessDisplayIdFieldsInDisplayLayout) { |
int64_t id1 = 10001; |
int64_t id2 = 10002; |