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

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

Issue 24108003: [Cleanup] Rename WindowSettings to WindowState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase fix Created 7 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/wm/dock/docked_window_resizer.cc ('k') | ash/wm/drag_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/dock/docked_window_resizer_unittest.cc
diff --git a/ash/wm/dock/docked_window_resizer_unittest.cc b/ash/wm/dock/docked_window_resizer_unittest.cc
index 34a39d23d707923b239dce2d10e00ae1fce7fb14..024187cbfd26bbfd4c87c18a760a36aef11dff38 100644
--- a/ash/wm/dock/docked_window_resizer_unittest.cc
+++ b/ash/wm/dock/docked_window_resizer_unittest.cc
@@ -22,7 +22,7 @@
#include "ash/wm/dock/docked_window_layout_manager.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 "ash/wm/window_util.h"
#include "base/command_line.h"
#include "ui/aura/client/aura_constants.h"
@@ -200,7 +200,7 @@ class DockedWindowResizerTest
// x-coordinate can get adjusted by snapping or sticking.
// y-coordinate could be changed by possible automatic layout if docked.
if (window->parent()->id() != internal::kShellWindowId_DockedContainer &&
- GetRestoreBoundsInScreen(window) == NULL) {
+ !wm::GetWindowState(window)->HasRestoreBounds()) {
EXPECT_EQ(initial_bounds.y() + dy, window->GetBoundsInScreen().y());
}
}
@@ -701,7 +701,8 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther)
// Maximize the second window - Maximized area should be shrunk.
const gfx::Rect restored_bounds = w2->bounds();
- wm::MaximizeWindow(w2.get());
+ wm::WindowState* w2_state = wm::GetWindowState(w2.get());
+ w2_state->Maximize();
EXPECT_EQ(ScreenAsh::GetDisplayBoundsInParent(w2.get()).width() -
manager->docked_width_ - DockedWindowLayoutManager::kMinDockGap,
w2->bounds().width());
@@ -745,7 +746,7 @@ TEST_P(DockedWindowResizerTest, AttachWindowMaximizeOther)
w2->bounds().width());
// Unmaximize the second window.
- wm::RestoreWindow(w2.get());
+ w2_state->Restore();
// Its bounds should get restored.
EXPECT_EQ(restored_bounds, w2->bounds());
}
@@ -1029,7 +1030,7 @@ TEST_P(DockedWindowResizerTest, DragToShelf)
if (test_panels()) {
// The panel should be touching the shelf and attached.
EXPECT_EQ(shelf_y, w1->bounds().bottom());
- EXPECT_TRUE(wm::GetWindowSettings(w1.get())->panel_attached());
+ EXPECT_TRUE(wm::GetWindowState(w1.get())->panel_attached());
} else {
// The window should not be touching the shelf.
EXPECT_EQ(shelf_y - kDistanceFromShelf, w1->bounds().bottom());
« no previous file with comments | « ash/wm/dock/docked_window_resizer.cc ('k') | ash/wm/drag_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698