| Index: ash/wm/panels/panel_window_resizer_unittest.cc
|
| diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
|
| index 81bff9c737cdea62db2bc6176bcad989925bf5bb..7faba1fd7f4ac2416ec665aecc1d936f14b8b333 100644
|
| --- a/ash/wm/panels/panel_window_resizer_unittest.cc
|
| +++ b/ash/wm/panels/panel_window_resizer_unittest.cc
|
| @@ -18,7 +18,7 @@
|
| #include "ash/test/test_launcher_delegate.h"
|
| #include "ash/wm/drag_window_resizer.h"
|
| #include "ash/wm/panels/panel_layout_manager.h"
|
| -#include "ash/wm/window_settings.h"
|
| +#include "ash/wm/window_state.h"
|
| #include "ui/aura/client/aura_constants.h"
|
| #include "ui/aura/root_window.h"
|
| #include "ui/base/hit_test.h"
|
| @@ -98,7 +98,8 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| // Test dragging the panel slightly, then detaching, and then reattaching
|
| // dragging out by the vector (dx, dy).
|
| void DetachReattachTest(aura::Window* window, int dx, int dy) {
|
| - EXPECT_TRUE(wm::GetWindowSettings(window)->panel_attached());
|
| + wm::WindowState* window_state = wm::GetWindowState(window);
|
| + EXPECT_TRUE(window_state->panel_attached());
|
| aura::RootWindow* root_window = window->GetRootWindow();
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
| DragStart(window);
|
| @@ -118,7 +119,7 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| // The panel should be detached when the drag completes.
|
| DragEnd();
|
|
|
| - EXPECT_FALSE(wm::GetWindowSettings(window)->panel_attached());
|
| + EXPECT_FALSE(window_state->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
| EXPECT_EQ(root_window, window->GetRootWindow());
|
| @@ -130,7 +131,7 @@ class PanelWindowResizerTest : public test::AshTestBase {
|
| DragEnd();
|
|
|
| // The panel should be reattached and have snapped to the launcher.
|
| - EXPECT_TRUE(wm::GetWindowSettings(window)->panel_attached());
|
| + EXPECT_TRUE(window_state->panel_attached());
|
| EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
|
| EXPECT_EQ(initial_bounds.y(), window->GetBoundsInScreen().y());
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
| @@ -290,7 +291,7 @@ TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) {
|
| EXPECT_EQ(root_windows[0], window->GetRootWindow());
|
| EXPECT_EQ(initial_bounds.x(), window->GetBoundsInScreen().x());
|
| EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
|
|
| @@ -300,7 +301,7 @@ TEST_F(PanelWindowResizerTest, DetachThenDragAcrossDisplays) {
|
| EXPECT_EQ(root_windows[1], window->GetRootWindow());
|
| EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
|
| EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
| }
|
| @@ -321,7 +322,7 @@ TEST_F(PanelWindowResizerTest, DetachAcrossDisplays) {
|
| EXPECT_EQ(root_windows[1], window->GetRootWindow());
|
| EXPECT_EQ(initial_bounds.x() + 500, window->GetBoundsInScreen().x());
|
| EXPECT_EQ(initial_bounds.y() - 100, window->GetBoundsInScreen().y());
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
| }
|
| @@ -342,7 +343,7 @@ TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) {
|
| DragMove(0, -100);
|
| DragEnd();
|
| EXPECT_EQ(root_windows[0], window->GetRootWindow());
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
|
|
| // Drag the window just above the other display's launcher.
|
| DragStart(window.get());
|
| @@ -355,7 +356,7 @@ TEST_F(PanelWindowResizerTest, DetachThenAttachToSecondDisplay) {
|
|
|
| // When dropped should move to second display's panel container.
|
| EXPECT_EQ(root_windows[1], window->GetRootWindow());
|
| - EXPECT_TRUE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
| }
|
|
|
| @@ -381,26 +382,26 @@ TEST_F(PanelWindowResizerTest, AttachToSecondDisplay) {
|
|
|
| // When dropped should move to second display's panel container.
|
| EXPECT_EQ(root_windows[1], window->GetRootWindow());
|
| - EXPECT_TRUE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
| }
|
|
|
| TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) {
|
| scoped_ptr<aura::Window> window(
|
| CreatePanelWindow(gfx::Rect(0, 0, 201, 201)));
|
| - EXPECT_TRUE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
| DragStart(window.get());
|
| DragMove(0, -100);
|
| DragRevert();
|
| - EXPECT_TRUE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_TRUE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_PanelContainer, window->parent()->id());
|
|
|
| // Detach panel.
|
| DragStart(window.get());
|
| DragMove(0, -100);
|
| DragEnd();
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
|
|
| @@ -410,7 +411,7 @@ TEST_F(PanelWindowResizerTest, RevertDragRestoresAttachment) {
|
|
|
| // When the drag is reverted it should remain detached.
|
| DragRevert();
|
| - EXPECT_FALSE(wm::GetWindowSettings(window.get())->panel_attached());
|
| + EXPECT_FALSE(wm::GetWindowState(window.get())->panel_attached());
|
| EXPECT_EQ(internal::kShellWindowId_DefaultContainer,
|
| window->parent()->id());
|
| }
|
|
|