| Index: ash/root_window_controller_unittest.cc
|
| diff --git a/ash/root_window_controller_unittest.cc b/ash/root_window_controller_unittest.cc
|
| index d6369dd0c2454f5ba5b2f70272930c0d665ede6f..4d33dee044f5f92312abd25a25a08660aabc9b4a 100644
|
| --- a/ash/root_window_controller_unittest.cc
|
| +++ b/ash/root_window_controller_unittest.cc
|
| @@ -6,7 +6,6 @@
|
|
|
| #include <memory>
|
|
|
| -#include "ash/common/material_design/material_design_controller.h"
|
| #include "ash/common/session/session_controller.h"
|
| #include "ash/common/session/session_state_delegate.h"
|
| #include "ash/common/system/tray/system_tray_delegate.h"
|
| @@ -17,7 +16,6 @@
|
| #include "ash/common/wm_window.h"
|
| #include "ash/public/cpp/shell_window_ids.h"
|
| #include "ash/shell.h"
|
| -#include "ash/test/ash_md_test_base.h"
|
| #include "ash/test/ash_test_base.h"
|
| #include "ash/wm/window_properties.h"
|
| #include "ash/wm/window_state_aura.h"
|
| @@ -106,7 +104,7 @@ WmLayoutManager* GetLayoutManager(RootWindowController* controller, int id) {
|
|
|
| namespace test {
|
|
|
| -class RootWindowControllerTest : public AshMDTestBase {
|
| +class RootWindowControllerTest : public AshTestBase {
|
| public:
|
| views::Widget* CreateTestWidget(const gfx::Rect& bounds) {
|
| views::Widget* widget = views::Widget::CreateWindowWithContextAndBounds(
|
| @@ -136,16 +134,7 @@ class RootWindowControllerTest : public AshMDTestBase {
|
| }
|
| };
|
|
|
| -INSTANTIATE_TEST_CASE_P(
|
| - /* prefix intentionally left blank due to only one parameterization */,
|
| - RootWindowControllerTest,
|
| - testing::Values(MaterialDesignController::NON_MATERIAL,
|
| - MaterialDesignController::MATERIAL_NORMAL,
|
| - MaterialDesignController::MATERIAL_EXPERIMENTAL));
|
| -
|
| -TEST_P(RootWindowControllerTest, MoveWindows_Basic) {
|
| - const int height_offset = GetMdMaximizedWindowHeightOffset();
|
| -
|
| +TEST_F(RootWindowControllerTest, MoveWindows_Basic) {
|
| // Windows origin should be doubled when moved to the 1st display.
|
| UpdateDisplay("600x600,300x300");
|
| aura::Window::Windows root_windows = Shell::GetAllRootWindows();
|
| @@ -159,9 +148,9 @@ TEST_P(RootWindowControllerTest, MoveWindows_Basic) {
|
| views::Widget* maximized = CreateTestWidget(gfx::Rect(700, 10, 100, 100));
|
| maximized->Maximize();
|
| EXPECT_EQ(root_windows[1], maximized->GetNativeView()->GetRootWindow());
|
| - EXPECT_EQ(gfx::Rect(600, 0, 300, 253 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(600, 0, 300, 252).ToString(),
|
| maximized->GetWindowBoundsInScreen().ToString());
|
| - EXPECT_EQ(gfx::Rect(0, 0, 300, 253 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(0, 0, 300, 252).ToString(),
|
| maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
|
|
|
| views::Widget* minimized = CreateTestWidget(gfx::Rect(800, 10, 100, 100));
|
| @@ -220,18 +209,18 @@ TEST_P(RootWindowControllerTest, MoveWindows_Basic) {
|
| // share the same desktop workspace, which cancels the shelf status.
|
| fullscreen->SetFullscreen(false);
|
| EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
|
| - EXPECT_EQ(gfx::Rect(0, 0, 600, 553 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(0, 0, 600, 552).ToString(),
|
| maximized->GetWindowBoundsInScreen().ToString());
|
| - EXPECT_EQ(gfx::Rect(0, 0, 600, 553 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(0, 0, 600, 552).ToString(),
|
| maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
|
|
|
| // Set fullscreen to true, but maximized window's size won't change because
|
| // it's not visible. see crbug.com/504299.
|
| fullscreen->SetFullscreen(true);
|
| EXPECT_EQ(root_windows[0], maximized->GetNativeView()->GetRootWindow());
|
| - EXPECT_EQ(gfx::Rect(0, 0, 600, 553 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(0, 0, 600, 552).ToString(),
|
| maximized->GetWindowBoundsInScreen().ToString());
|
| - EXPECT_EQ(gfx::Rect(0, 0, 600, 553 + height_offset).ToString(),
|
| + EXPECT_EQ(gfx::Rect(0, 0, 600, 552).ToString(),
|
| maximized->GetNativeView()->GetBoundsInRootWindow().ToString());
|
|
|
| EXPECT_EQ(root_windows[0], minimized->GetNativeView()->GetRootWindow());
|
| @@ -265,7 +254,7 @@ TEST_P(RootWindowControllerTest, MoveWindows_Basic) {
|
| EXPECT_EQ(kShellWindowId_PanelContainer, panel->parent()->id());
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, MoveWindows_Modal) {
|
| +TEST_F(RootWindowControllerTest, MoveWindows_Modal) {
|
| UpdateDisplay("500x500,500x500");
|
|
|
| aura::Window::Windows root_windows = Shell::GetAllRootWindows();
|
| @@ -295,7 +284,7 @@ TEST_P(RootWindowControllerTest, MoveWindows_Modal) {
|
| }
|
|
|
| // Make sure lock related windows moves.
|
| -TEST_P(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
|
| +TEST_F(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
|
| display_manager()->SetUnifiedDesktopEnabled(true);
|
|
|
| UpdateDisplay("500x500");
|
| @@ -373,7 +362,7 @@ TEST_P(RootWindowControllerTest, MoveWindows_LockWindowsInUnified) {
|
| EXPECT_EQ("0,0 600x500", lock_screen->GetNativeWindow()->bounds().ToString());
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, ModalContainer) {
|
| +TEST_F(RootWindowControllerTest, ModalContainer) {
|
| UpdateDisplay("600x600");
|
| WmShell* wm_shell = WmShell::Get();
|
| RootWindowController* controller = wm_shell->GetPrimaryRootWindowController();
|
| @@ -410,7 +399,7 @@ TEST_P(RootWindowControllerTest, ModalContainer) {
|
| wm_shell->GetSessionStateDelegate()->UnlockScreen();
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
|
| +TEST_F(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
|
| UpdateDisplay("600x600");
|
|
|
| // Configure login screen environment.
|
| @@ -455,7 +444,7 @@ TEST_P(RootWindowControllerTest, ModalContainerNotLoggedInLoggedIn) {
|
| WmLookup::Get()->GetWindowForWidget(session_modal_widget)));
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, ModalContainerBlockedSession) {
|
| +TEST_F(RootWindowControllerTest, ModalContainerBlockedSession) {
|
| UpdateDisplay("600x600");
|
| RootWindowController* controller =
|
| WmShell::Get()->GetPrimaryRootWindowController();
|
| @@ -496,7 +485,7 @@ TEST_P(RootWindowControllerTest, ModalContainerBlockedSession) {
|
| }
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, GetWindowForFullscreenMode) {
|
| +TEST_F(RootWindowControllerTest, GetWindowForFullscreenMode) {
|
| UpdateDisplay("600x600");
|
| RootWindowController* controller = Shell::GetPrimaryRootWindowController();
|
|
|
| @@ -527,7 +516,7 @@ TEST_P(RootWindowControllerTest, GetWindowForFullscreenMode) {
|
| EXPECT_EQ(NULL, controller->GetWindowForFullscreenMode());
|
| }
|
|
|
| -TEST_P(RootWindowControllerTest, MultipleDisplaysGetWindowForFullscreenMode) {
|
| +TEST_F(RootWindowControllerTest, MultipleDisplaysGetWindowForFullscreenMode) {
|
| UpdateDisplay("600x600,600x600");
|
| Shell::RootWindowControllerList controllers =
|
| Shell::GetInstance()->GetAllRootWindowControllers();
|
| @@ -564,7 +553,7 @@ TEST_P(RootWindowControllerTest, MultipleDisplaysGetWindowForFullscreenMode) {
|
|
|
| // Test that GetRootWindowController() works with multiple displays and
|
| // child widgets.
|
| -TEST_P(RootWindowControllerTest, GetRootWindowController) {
|
| +TEST_F(RootWindowControllerTest, GetRootWindowController) {
|
| UpdateDisplay("600x600,600x600");
|
| Shell::RootWindowControllerList controllers =
|
| Shell::GetInstance()->GetAllRootWindowControllers();
|
| @@ -592,7 +581,7 @@ TEST_P(RootWindowControllerTest, GetRootWindowController) {
|
|
|
| // Test that user session window can't be focused if user session blocked by
|
| // some overlapping UI.
|
| -TEST_P(RootWindowControllerTest, FocusBlockedWindow) {
|
| +TEST_F(RootWindowControllerTest, FocusBlockedWindow) {
|
| UpdateDisplay("600x600");
|
| RootWindowController* controller = Shell::GetPrimaryRootWindowController();
|
| aura::Window* lock_container =
|
| @@ -651,7 +640,7 @@ class DestroyedWindowObserver : public aura::WindowObserver {
|
| };
|
|
|
| // Verifies shutdown doesn't delete windows that are not owned by the parent.
|
| -TEST_P(RootWindowControllerTest, DontDeleteWindowsNotOwnedByParent) {
|
| +TEST_F(RootWindowControllerTest, DontDeleteWindowsNotOwnedByParent) {
|
| DestroyedWindowObserver observer1;
|
| aura::test::TestWindowDelegate delegate1;
|
| aura::Window* window1 = new aura::Window(&delegate1);
|
|
|