X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fash%2Fwm%2Fwindow_state_unittest.cc;h=3a457286242087d398d4705ad26795ec5b6ff556;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=cef8fbbe25304830a70be20b3c77c78a07f013b6;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/ash/wm/window_state_unittest.cc b/src/ash/wm/window_state_unittest.cc index cef8fbb..3a45728 100644 --- a/src/ash/wm/window_state_unittest.cc +++ b/src/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" @@ -124,9 +125,14 @@ TEST_F(WindowStateTest, SnapWindowMinimumSize) { kWorkAreaBounds.height()); 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)); + // It should not be possible to snap a window with a maximum size, or if it + // cannot be maximized. + 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()); + delegate.set_maximum_size(gfx::Size()); + window->SetProperty(aura::client::kCanMaximizeKey, false); EXPECT_FALSE(window_state->CanSnap()); }