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

Unified Diff: ash/frame/custom_frame_view_ash_unittest.cc

Issue 2914793005: [mus+ash] Fixes minimum browser window size (store / retrieve kPreferredSize property) (Closed)
Patch Set: [mus+ash] Fixes minimum browser window size (tests) Created 3 years, 6 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/frame/custom_frame_view_ash.cc ('k') | ash/public/cpp/mus_property_mirror_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/custom_frame_view_ash_unittest.cc
diff --git a/ash/frame/custom_frame_view_ash_unittest.cc b/ash/frame/custom_frame_view_ash_unittest.cc
index b524b63cb46b2ff1ed637b50067e5311638fca53..33b4c714a789f55dc54973cedc0a40fb37dee6c2 100644
--- a/ash/frame/custom_frame_view_ash_unittest.cc
+++ b/ash/frame/custom_frame_view_ash_unittest.cc
@@ -173,6 +173,25 @@ TEST_F(CustomFrameViewAshTest, MinimumAndMaximumSize) {
max_frame_size.height());
}
+// Verify that CustomFrameViewAsh returns the correct minimum frame size when
+// the kMinimumSize property is set.
+TEST_F(CustomFrameViewAshTest, HonorsMinimumSizeProperty) {
+ const gfx::Size min_client_size(500, 500);
+ TestWidgetConstraintsDelegate* delegate = new TestWidgetConstraintsDelegate;
+ delegate->set_minimum_size(min_client_size);
+ std::unique_ptr<views::Widget> widget(CreateWidget(delegate));
+
+ // Update the native window's minimum size property.
+ const gfx::Size min_window_size(600, 700);
+ widget->GetNativeWindow()->SetProperty(aura::client::kMinimumSize,
+ new gfx::Size(min_window_size));
+
+ CustomFrameViewAsh* custom_frame_view = delegate->custom_frame_view();
+ const gfx::Size min_frame_size = custom_frame_view->GetMinimumSize();
+
+ EXPECT_EQ(min_window_size, min_frame_size);
+}
+
// Verify that CustomFrameViewAsh updates the avatar icon based on the
// avatar icon window property.
TEST_F(CustomFrameViewAshTest, AvatarIcon) {
« no previous file with comments | « ash/frame/custom_frame_view_ash.cc ('k') | ash/public/cpp/mus_property_mirror_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698