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

Unified Diff: ash/wm/window_state_unittest.cc

Issue 557693002: [Ash] Only snap windows that can maximize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 6 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
Index: ash/wm/window_state_unittest.cc
diff --git a/ash/wm/window_state_unittest.cc b/ash/wm/window_state_unittest.cc
index cef8fbbe25304830a70be20b3c77c78a07f013b6..666976698511a7d18c576fd6ee2fe0a0ad65cb79 100644
--- a/ash/wm/window_state_unittest.cc
+++ b/ash/wm/window_state_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/test/ash_test_base.h"
#include "ash/wm/window_state.h"
#include "ash/wm/wm_event.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window.h"
@@ -125,8 +126,9 @@ TEST_F(WindowStateTest, SnapWindowMinimumSize) {
EXPECT_EQ(expected.ToString(), window->GetBoundsInScreen().ToString());
// It should not be possible to snap a window with a maximum size.
- delegate.set_minimum_size(gfx::Size());
- delegate.set_maximum_size(gfx::Size(kWorkAreaBounds.width() - 1, INT_MAX));
+ delegate.set_maximum_size(gfx::Size(kWorkAreaBounds.width() - 1, 0));
+ EXPECT_FALSE(window_state->CanSnap());
+ delegate.set_maximum_size(gfx::Size(0, kWorkAreaBounds.height() - 1));
EXPECT_FALSE(window_state->CanSnap());
oshima 2014/09/11 01:00:05 I probably wasn't clear, sorry: You should also t
jackhou1 2014/09/11 01:52:43 Done.
}

Powered by Google App Engine
This is Rietveld 408576698